Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
small update to documentation
  • Loading branch information
reazulhoque committed Oct 6, 2020
commit 2757c56c768b71950a18d2bd3076584618165587
12 changes: 5 additions & 7 deletions numba/dppl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""

TODO: UPDATE DOCUMENTATION WITH DPCTL

Module to interact with Intel based devices


Expand Down Expand Up @@ -167,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 @@ -196,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