Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can't run simple program on GPU #1087

Open
ZzEeKkAa opened this issue Jul 6, 2023 · 1 comment
Open

Can't run simple program on GPU #1087

ZzEeKkAa opened this issue Jul 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ZzEeKkAa
Copy link
Contributor

ZzEeKkAa commented Jul 6, 2023

I'm trying to run simple dpjit code:

import dpnp as dnp
import numpy as np
import numba as nb
from numba_dpex import dpjit

@dpjit
def _sum_nomask(res):
    tot = nb.float32(1.0)
    res[1] = tot

if __name__ == "__main__":
    arr = dnp.arange(10, dtype=np.float32)
    _sum_nomask(res)
    print("dpex:", res)

The example works on cpu, but does not work on GPU:

ONEAPI_DEVICE_SELECTOR=opencl:gpu python example.py
[1]    2251 segmentation fault  ONEAPI_DEVICE_SELECTOR=opencl:gpu python numba_dpex_jax.py

Running on integrated intel gpu 12th gen

@ZzEeKkAa ZzEeKkAa added the bug Something isn't working label Jul 6, 2023
@mingjie-intel
Copy link
Contributor

Following works:

@dpjit
def _sum_nomask2():
    tot=nb.float32(2.0)
    return tot

if __name__ == "__main__":
    arr = dnp.arange(10, dtype=np.float32)
    arr[1]=_sum_nomask2()
    print("done")
    print("dpex:", arr)

@diptorupd diptorupd removed their assignment Apr 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants