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

Atomics test cases fail on 4th gen Xeon CPU with OpenCL backend #986

Closed
adarshyoga opened this issue Mar 30, 2023 · 2 comments · Fixed by #1015
Closed

Atomics test cases fail on 4th gen Xeon CPU with OpenCL backend #986

adarshyoga opened this issue Mar 30, 2023 · 2 comments · Fixed by #1015
Labels
user User submitted issue

Comments

@adarshyoga
Copy link
Contributor

All test cases that verify atomic operations in numba_dpex/tests/kernel_tests/test_atomic_op.py fail with segmentation fault when run on 4th gen Xeon CPU (SPR) with OpenCL backend.

Hardware - Intel(R) OpenCL, Intel(R) Xeon(R) Platinum 8465C CPU
numba-dpex: 0.20.0
numba: 0.56.4
dpctl: 0.14.2
dpnp: 0.11.1

Failure log:

.conda/envs/dpep/lib/python3.9/site-packages/numba_dpex/tests/kernel_tests/test_atomic_op.py::test_kernel_atomic_simple[int32-kernel_result_pair0-opencl:cpu:0] Segmentation fault (core dumped)
@mingjie-intel mingjie-intel added the user User submitted issue label Mar 30, 2023
@oleksandr-pavlyk
Copy link
Contributor

oleksandr-pavlyk commented Apr 7, 2023

Please provide output of python -c "import dpctl; dpctl.select_cpu_device().print_device_info()" to identify the driver version.

@adarshyoga
Copy link
Contributor Author

adarshyoga commented Apr 10, 2023

There is no issue with atomic operations on CPU with int32. It looks the test file test_atomic_op.py is not updated to follow CFD semantics. Here is the same test case after making CFD changes.

import numba_dpex as dpex
import dpnp as np

@dpex.kernel
def f(a):
    dpex.atomic.add(a, 0, 1)

a = np.zeros(100, dtype=np.int32)
print ("BEFORE: \n", a)
f[100, ](a)
print("AFTER: \n", a)

Here is the log (with trivial edits for brevity) from running this test case on 4th gen Xeon CPU with OpenCL backend.

:~> ONEAPI_DEVICE_SELECTOR=opencl:cpu:* python atomic_test.py
BEFORE:
 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

AFTER:
 [100   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0]

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

Successfully merging a pull request may close this issue.

3 participants