arrayfire / arrayfire/arrayfire
[BUG] Very simple snippet not working on OpenCL, about af::range, af::dim4 and af::where
- Lingua principale
- C++
- Stelle
- 4.9k
- Fork
- 555
- Merge medio
- 1h 24m
- PR unite (30g)
- 1
Descrizione
Hi,
This very simple snippet is working on the CPU backend, but not on the OpenCL backend.
```
af::setBackend(AF_BACKEND_OPENCL);
af::setDevice(0);
af::info(); std::cout << std::endl;
af::array arrayA = af::range(af::dim4(101, 101, 101), 2, s32);
af::array tmpA = af::where(arrayA == 0);
std::cout << tmpA.dims(0) << std::endl;
af::array arrayB = af::range(af::dim4(141, 141, 141), 2, s32);
af::array tmpB = af::where(arrayB == 0);
std::cout << tmpB.dims(0) << std::endl;
```
I tried on version AF_3.7.3 as well as AF_3.8.3 and AF_3.8.2. None are working correctly on OpenCL. Indeed, on the CPU the answer of tmpB.dims(0) is 19881, but is 0 on OpenCL. The array tmpB, should not be empty.
The problem only appears when the size of the arrayB is getting bigger as arrayA does not cause any issues.
Let me know if you can't reproduce on your end and I could submit more details.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.