You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In macOS, I noticed that the TestAtomics unit-tests have one test failing. The error is related to the cl2Metal conversion which implies that the Metal clang implementation probably does not support the long type for atom_add.
This issue seems to be OS-specific. Hence, I am opening it in order to document it and provide a patch as workaround.
tornado-test -V uk.ac.manchester.tornado.unittests.atomics.TestAtomics#testAtomic18_parallel_api_LongArray
WARNING: Using incubator modules: jdk.incubator.vector
UNSUPPORTED (log once): buildComputeProgram: cl2Metal failed
[ERROR] TornadoVM JIT Compiler - OpenCL Build Error Log:
program_source:21:13: error: call to 'atom_add' is ambiguous
l_8 = atom_add((volatile __global long *) ul_7,1L); ^~~~~~~~/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.406/include/opencl-c.h:13111:12: note: candidate functionint __ovld atom_add(volatile __global int *p, int val); ^/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.406/include/opencl-c.h:13112:13: note: candidate functionuint __ovld atom_add(volatile __global uint *p, uint val);
Expected behavior
It seems that the Metal-based OpenCL implementation of the atom_add may not support long types.
If I change at the code gen the casted type to be int instead of long, it works:
l_8 = atom_add((volatile __global int *) ul_7, 1L);
Describe the bug
In
macOS
, I noticed that theTestAtomics
unit-tests have one test failing. The error is related to thecl2Metal
conversion which implies that the Metal clang implementation probably does not support the long type foratom_add
.This issue seems to be OS-specific. Hence, I am opening it in order to document it and provide a patch as workaround.
How To Reproduce
Build TornadoVM with OpenCL backend on macOS:
Then run:
Expected behavior
It seems that the Metal-based OpenCL implementation of the
atom_add
may not support long types.If I change at the code gen the casted type to be
int
instead oflong
, it works:See the patch: ISSUE_637.patch
Computing system setup (please complete the following information):
4d8be35
1.0.11-dev
develop
The text was updated successfully, but these errors were encountered: