arrayfire / arrayfire/arrayfire-python

OpenCL interoperability does not work on CUDA machine

Open
#267 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
422
Forks
63
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the backend checks in arrayfire/opencl.py around line 107 and inspect the commented reproduction in tests/simple/interop.py around line 82. Run that interoperability test on a Linux CUDA machine and compare get_backend() with get_active_backend(); done means OpenCL interoperability succeeds without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.