Skip to content

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

Description

@sebastienleclaire

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions