[BUG] found on AF 3.8.3 and 3.9.0 for OPENCL, possibly with af::join
sebastienleclaire opened this issue · comments
Hi,
First, congragulation for the release of AF 3.9.0.
I found a bug on OpenCL for AF version 3.8.3 and 3.9.0. Everything is fine with 3.8.2 on CPU and OPENCL. I did not test CUDA or ONEAPI.
Here the snippet:
float column_host[] = { 1, 2, 3 };
af::array column(3, 1, column_host);
af::array result1 = af::join(1, -column, af::constant(0, 3, 1, f32), column);
af_print(result1)
af::array result2 = af::join(1, -column, af::constant(0, 3, 1, f32));
result2 = af::join(1, result2, column);
af_print(result2)
I'm not sure where the problem is comming from but result1 and result2 should be identical between CPU and OPENCL, however I do get:
FOR OPENCL:
result1
[3 3 1 1]
1.0000 -1.0000 0.0000
2.0000 -2.0000 0.0000
3.0000 -3.0000 0.0000
FOR CPU:
result1 and result2
[3 3 1 1]
-1.0000 0.0000 1.0000
-2.0000 0.0000 2.0000
-3.0000 0.0000 3.0000
The correct result should be "result2" as in AF 3.8.2 and before.
If you can't reproduce the problem, please let me know and I'll post more information.
Sébastien Leclaire
Hey thanks for submitting this issue. I was able to reproduce this. I am investigating the issue and will follow up with a solution.
Thanks
Thanks @willyborn for submitting the PR. I am going to try to get it in later today so we can fix this issue.
Hello @umar456! Is there any progress on this? I've just got bitten by this bug, and a fix/workaround would be greatly appreciated.