Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_for_develop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ done
set -x

python setup.py clean --all
python setup.py build --inplace
python setup.py build_ext --inplace
python setup.py develop
11 changes: 6 additions & 5 deletions numba/dppl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""

Module to interact with Intel based devices


Expand Down Expand Up @@ -164,7 +165,7 @@ def foo(in, out):
---------------------------------------------------------------------------
import numpy as np
from numba import dppl
import dppl.ocldrv as ocldrv
import dpctl

@dppl.kernel
def data_parallel_sum(a, b, c):
Expand Down Expand Up @@ -193,11 +194,11 @@ def main():
b = np.array(np.random.random(N), dtype=np.float32)
c = np.ones_like(a)

if ocldrv.has_gpu_device:
with ocldrv.igpu_context(0) as device_env:
if dpctl.has_gpu_queues():
with dpctl.device_context("opencl:gpu") as gpu_queue:
driver(device_env, a, b, c, global_size)
elif ocldrv.has_cpu_device:
with ocldrv.cpu_context(0) as device_env:
elif dpctl.has_cpu_queues():
with dpctl.device_context("opencl:cpu") as cpu_queue:
driver(device_env, a, b, c, global_size)
else:
print("No device found")
Expand Down
Loading