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

[BUG] found on AF 3.8.3 and 3.9.0 for OPENCL, possibly with af::join #3511

Open
sebastienleclaire opened this issue Oct 13, 2023 · 4 comments · May be fixed by #3513
Open

[BUG] found on AF 3.8.3 and 3.9.0 for OPENCL, possibly with af::join #3511

sebastienleclaire opened this issue Oct 13, 2023 · 4 comments · May be fixed by #3513
Labels

Comments

@sebastienleclaire
Copy link

sebastienleclaire commented Oct 13, 2023

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

@umar456
Copy link
Member

umar456 commented Oct 13, 2023

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

@willyborn
Copy link
Contributor

willyborn commented Oct 14, 2023 via email

@umar456
Copy link
Member

umar456 commented Oct 16, 2023

Thanks @willyborn for submitting the PR. I am going to try to get it in later today so we can fix this issue.

@twesterhout
Copy link

Hello @umar456! Is there any progress on this? I've just got bitten by this bug, and a fix/workaround would be greatly appreciated.

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

Successfully merging a pull request may close this issue.

4 participants