Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCL interoperability does not work on CUDA machine #267

Open
villekf opened this issue Apr 22, 2024 · 1 comment
Open

OpenCL interoperability does not work on CUDA machine #267

villekf opened this issue Apr 22, 2024 · 1 comment

Comments

@villekf
Copy link

villekf commented Apr 22, 2024

On (Linux) CUDA machine, the backend returned by af.get_backend() remains at unified even if the backend is correctly set as OpenCL. af.get_active_backend() correctly returns OpenCL as the backend, but since the interoperability functions use different way to check the backend, an error is output (see https://github.com/arrayfire/arrayfire-python/blob/master/arrayfire/opencl.py#L107). Commenting all those instances fixes the issue. The (commented) tests reproduce this error, i.e. https://github.com/arrayfire/arrayfire-python/blob/master/tests/simple/interop.py#L82

Note that this wasn't an issue on a (Windows) AMD machine, where OpenCL is the default backend.

@TheFloatingBrain
Copy link

TheFloatingBrain commented Oct 8, 2024

I get it too

>>> af.get_active_backend()
'opencl'
>>> af.get_backend()
'unified'
>>> af.set_backend("opencl")
>>> af.get_backend()
'unified'

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

No branches or pull requests

2 participants