Skip to content

Commit e8c29dd

Browse files
Correctly created default_context for non-Linux platforms
Replaced `default_context = None` with `default_context = dpctl.SyclQueue(root_device).sycl_context` in `from_dlpack_capsule` for non-Linux platforms
1 parent f7b5f55 commit e8c29dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpctl/tensor/_dlpack.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ cpdef usm_ndarray from_dlpack_capsule(object py_caps) except +:
340340
if _IS_LINUX:
341341
default_context = root_device.sycl_platform.default_context
342342
else:
343-
default_context = None
343+
default_context = dpctl.SyclQueue(root_device).sycl_context
344344
except RuntimeError:
345345
default_context = dpctl.SyclQueue(root_device).sycl_context
346346
if dlm_tensor.dl_tensor.data is NULL:

0 commit comments

Comments
 (0)