[BUG] `Array::get_backend()` can never return `OPENCL`
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Start with src/core/array.rs:392-404 and compare the backend values in include/af/defines.h:414-417. Update the mapping so an OpenCL-created array is reported as Backend::OPENCL, then run the existing test suite or backend-related tests to verify the result.
Written by the indexing model from the issue text.
Description
match (err_val, ret_val) {
(0, 1) => Backend::CPU,
(0, 2) => Backend::CUDA,
(0, 3) => Backend::OPENCL,
_ => Backend::DEFAULT,
}
af_backend is a bit-flag enum, not sequential (include/af/defines.h:414-417, v3.8.0):
AF_BACKEND_DEFAULT = 0,
AF_BACKEND_CPU = 1,
AF_BACKEND_CUDA = 2,
AF_BACKEND_OPENCL = 4
There is no backend with value 3. An OpenCL-created array returns 4, falls through to the wildcard, and is reported as Backend::DEFAULT.
Fix: (0, 4) => Backend::OPENCL.
Found by Claude Opus 5
- Dominant language
- Rust
- Stars
- 827
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from arrayfire/arrayfire-rust
-
Bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
arrayfire/arrayfire-rust#388 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
arrayfire/arrayfire-rust#386 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
arrayfire/arrayfire-rust#384 ·
-
Bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
arrayfire/arrayfire-rust#385 · 1 comment ·
-
Bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
arrayfire/arrayfire-rust#382 ·
All issues in arrayfire/arrayfire-rust
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100