Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

CUDA_ERROR_NO_DEVICE when used inside Ray Actor #571

Open
tbenst opened this issue May 25, 2024 · 1 comment
Open

CUDA_ERROR_NO_DEVICE when used inside Ray Actor #571

tbenst opened this issue May 25, 2024 · 1 comment

Comments

@tbenst
Copy link

tbenst commented May 25, 2024

Describe the bug
I get the error CUDA error: CUDA_ERROR_NO_DEVICE when run inside of ray.remote

To Reproduce

##
import PyNvCodec as nvc
import ray
##
# ok
nv = nvc.PyNvEncoder(
            {
                "preset": "P4",
                "codec": "hevc",  # Use H.265 codec
                "fps": "30",
                "s": "1920x1080",
                "bitrate": "10M",
                "gop": "60",
                "profile": "high"
            },
            0  # G
)
##
@ray.remote
class T():
    def __init__(self):
        self.nv = nvc.PyNvEncoder(
            {
                "preset": "P4",
                "codec": "hevc",  # Use H.265 codec
                "fps": "30",
                "s": "1920x1080",
                "bitrate": "10M",
                "gop": "60",
                "profile": "high"
            },
            0  # G
        )
# fails
T.remote()
(T pid=47452) Exception raised in creation task: The actor died because of an error raised in its creation task, ray::T.__init__() (pid=47452, ip=192.168.1.68, actor_id=34d055865916a666bd2e62b501000000, repr=<2024-05-25_ray_nvenc.T object at 0x70db17bfda20>)
(T pid=47452)   File "<ipython-input-3-bd07d4f981a3>", line 5, in __init__
(T pid=47452) RuntimeError: [/tmp/pip-req-build-k99edwsy/src/PyNvCodec/src/PyNvCodec.cpp:61](https://vscode-remote+ssh-002dremote-002binference1.vscode-resource.vscode-cdn.net/tmp/pip-req-build-k99edwsy/src/PyNvCodec/src/PyNvCodec.cpp:61)
(T pid=47452) CUDA error: CUDA_ERROR_NO_DEVICE
(T pid=47452) no CUDA-capable device is detected

Expected behavior
The CUDA device should be found

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Nvidia driver version: 550.67
  • CUDA Version: 12.4
  • Python Version: 3.10.13
  • Video Codec SDK Version: PyNvCodec 2.0
@RomanArzumanyan
Copy link
Contributor

Hi @tbenst

There’s been no active development going on in this repository for some time.

Please check out https://github.com/RomanArzumanyan/VALI which is VPF spin off. It’s actively developed and maintained. It also has compatible API and module naming.

You can simply duplicate your issue there if it reproduces on latest version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants