Skip to content

dpctl.tensor.sum function raises an error: SyclAsynchronousError #1434

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

Closed
npolina4 opened this issue Oct 10, 2023 · 4 comments
Closed

dpctl.tensor.sum function raises an error: SyclAsynchronousError #1434

npolina4 opened this issue Oct 10, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@npolina4
Copy link
Contributor

Device: opencl:cpu
OS: Linux
Occurrence frequency: periodically

import dpctl.tensor as dpt
x = dpt.arange(10, dtype=dpt.float32)
axes = [None, 0, (0,)]
for axis in axe:
    y = dpt.sum(a, axis=axis, dtype=dpt.complex128)
dpctl/_sycl_queue.pyx:126: in dpctl._sycl_queue.default_async_error_handler
    ???
E   dpctl._sycl_queue.SyclAsynchronousError: 1

The above exception was the direct cause of the following exception:
y = dpt.sum(
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/dpctl/tensor/_reduction.py:193: in sum
    return _reduction_over_axis(
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/dpctl/tensor/_reduction.py:139: in _reduction_over_axis
    dpctl.SyclEvent.wait_for(host_tasks_list)
E   SystemError: <built-in function wait_for> returned a result with an error set
@npolina4 npolina4 added the bug Something isn't working label Oct 10, 2023
@oleksandr-pavlyk
Copy link
Contributor

@oleksandr-pavlyk
Copy link
Contributor

Corrected example:

import dpctl.tensor as dpt

x = dpt.arange(10, dtype=dpt.float32, device='cpu')

for rep in range(16356):
    print(rep)
    axes = [None, 0, (0,)]
    for axis in axes:
        y = dpt.sum(x, axis=axis, dtype=dpt.complex128)

I could not reproduce the crash though.

@ndgrigorian
Copy link
Collaborator

I also could not reproduce the crash.

Similar crashes, however, do seem to be appearing in the CI, in various tests, and always where 'wait_for' is being used.
See:
https://github.com/IntelPython/dpctl/actions/runs/6458849200/job/17534736280
https://github.com/IntelPython/dpctl/actions/runs/6461852353/job/17543529221
https://github.com/IntelPython/dpctl/actions/runs/6461789466/job/17543428471
(last is a Windows case)

@oleksandr-pavlyk
Copy link
Contributor

Use of DPCTLEvent_WaitAndThrow has been replaced with use of DPCTLEvent_Wait.

The SyclAsynchronousError error exception class has been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants