File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -11,4 +11,27 @@ specific, such as linear algebra errors.
11
11
Exceptions
12
12
----------
13
13
14
- .. autodata :: DLPackCreationError
14
+ .. data :: AxisError
15
+
16
+ Given when an axis is invalid.
17
+
18
+ .. data :: DLPackCreationError
19
+
20
+ Given when constructing DLPack capsule from either :class: `dpnp.ndarray ` or
21
+ :class: `dpctl.tensor.usm_ndarray ` based on a USM allocation
22
+ on a partitioned SYCL device.
23
+
24
+ .. rubric :: Examples
25
+
26
+ .. code-block :: python
27
+
28
+ >> > import dpnp as np
29
+ >> > import dpctl
30
+ >> > dev = dpctl.SyclDevice(' cpu' )
31
+ >> > sdevs = dev.create_sub_devices(partition = [1 , 1 ])
32
+ >> > q = dpctl.SyclQueue(sdevs[0 ])
33
+ >> > x = np.ones(10 , sycl_queue = q)
34
+ >> > np.from_dlpack(x)
35
+ Traceback (most recent call last):
36
+ ...
37
+ DLPackCreationError: to_dlpack_capsule: DLPack can only export arrays based on USM allocations bound to a default platform SYCL context
You can’t perform that action at this time.
0 commit comments