Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
b537f30
Move full() to dpctl_ext/tensor
vlad-perevezentsev Feb 5, 2026
d50f263
Use full and _full_usm_ndarray from dpctl_ext in dpnp
vlad-perevezentsev Feb 6, 2026
f189dc5
Update .gitignore to ignore .so files in dpctl_ext
vlad-perevezentsev Feb 6, 2026
f9a1817
Move _zeros_usm_ndarray to dpctl_ext
vlad-perevezentsev Feb 6, 2026
4b8505a
Use _zeros_usm_ndarray from dpctl_ext in dpnp_fill.py
vlad-perevezentsev Feb 6, 2026
61106b2
Move linear-sequence implementations to dpctl_ext/tensor
vlad-perevezentsev Feb 6, 2026
a030579
Use _tensor_impl from dpctl_ext in dpnp_utils_fft.py
vlad-perevezentsev Feb 6, 2026
a1d6fa3
Move tril()/triu() to dpctl_ext/tensor
vlad-perevezentsev Feb 6, 2026
f1d6e56
Use tril/triu/_tril from dpctl_ext.tensor in dpnp
vlad-perevezentsev Feb 6, 2026
6680790
Disable pylint no-name-in-module for dpctl_ext
vlad-perevezentsev Feb 9, 2026
263b717
Add TODO comments
vlad-perevezentsev Feb 12, 2026
4130c1b
Use default_device_complex_type from dpctl_ext on test_array_api_info.py
vlad-perevezentsev Feb 12, 2026
17ca9ab
Remove unused build_dpctl_ext function
vlad-perevezentsev Feb 12, 2026
79cb2a4
Apply remarks for CMake files
vlad-perevezentsev Feb 12, 2026
4bf080e
Apply remarks for c++ files
vlad-perevezentsev Feb 12, 2026
cfa6cd6
Remove linear-sequence implementations
vlad-perevezentsev Feb 16, 2026
e0e50ac
Merge move_tensor_impl_ext into move_tensor_impl_ext_part_2
vlad-perevezentsev Feb 16, 2026
087a2ec
Use _tensor_impl from dpctl_ext in dpnp
vlad-perevezentsev Feb 16, 2026
f4492fb
Add missing include
vlad-perevezentsev Feb 16, 2026
b367c9f
Use nested namespace syntax
vlad-perevezentsev Feb 16, 2026
3113716
Add missing include complex
vlad-perevezentsev Feb 17, 2026
978afee
Add missing memory and queue checks
vlad-perevezentsev Feb 17, 2026
fec84ec
Move ti._copy_numpy_ndarray_into_usm_ndarray()
vlad-perevezentsev Feb 17, 2026
497e810
Move asnumpy(),from_numpy(), to_numpy() to dpctl_ext/tensor
vlad-perevezentsev Feb 17, 2026
3be4e14
Update dpnp.asnumpy to use dpctl_ext functions
vlad-perevezentsev Feb 17, 2026
1d88365
Move copy(), astype() to dpctl_ext/tensor
vlad-perevezentsev Feb 17, 2026
fd18db0
reuse astype(), copy() from dpctl_ext
vlad-perevezentsev Feb 17, 2026
0976171
Move _copy_usm_ndarray_for_reshape
vlad-perevezentsev Feb 17, 2026
318692e
Move reshape() to dpctl_ext/tensor
vlad-perevezentsev Feb 17, 2026
3c0c113
Reuse reshape from dpctl_ext in dpnp
vlad-perevezentsev Feb 17, 2026
30f2c53
Move _copy_usm_ndarray_for_roll
vlad-perevezentsev Feb 17, 2026
85c29da
Move roll() to dpctl_ext/tensor
vlad-perevezentsev Feb 17, 2026
6e8d857
Update dpnp.roll to use dpctl_ext
vlad-perevezentsev Feb 17, 2026
19e93b9
Update .gitignore to ignore .so files in dpctl_ext
vlad-perevezentsev Feb 18, 2026
b111e49
Remove unused includes in tensor_ctors.cpp
vlad-perevezentsev Feb 18, 2026
c082224
Use Python::Module for dpctl_ext static lib to avoid libpython depend…
vlad-perevezentsev Feb 18, 2026
9e7deb3
Merge move_tensor_impl_ext into move_tensor_impl_ext_part_2
vlad-perevezentsev Feb 18, 2026
1a736f7
Merge include-dpctl-tensor into move_tensor_impl_ext_part_2
vlad-perevezentsev Feb 19, 2026
8bde614
Merge move_tensor_impl_ext_part_2 into move_tensor_impl_copy
vlad-perevezentsev Feb 19, 2026
c3bc8ba
Move ti.mask_positions() and ti._cumsum_1d()
vlad-perevezentsev Feb 19, 2026
69b36b2
Move ti._extract(), ti._place(), ti._nonzero()
vlad-perevezentsev Feb 19, 2026
70a0fc6
Move place() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 19, 2026
afa5411
Move extract() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 19, 2026
7feb4ee
Move nonzero() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 19, 2026
f63f2f0
Move put_along_axis to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 19, 2026
6fecefe
Move take_along_axis() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 19, 2026
b60d095
Move ti._eye to() to dpctl_ext/tensor/libtensor
vlad-perevezentsev Feb 19, 2026
a1eea4e
Move eye() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 19, 2026
95ccf70
Move ti._repeat... to dpctl_ext/tensor
vlad-perevezentsev Feb 19, 2026
43f97cf
Move repeat() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 19, 2026
9b248f4
Move ti._where() to dpctl_ext/tensor/libtensor
vlad-perevezentsev Feb 19, 2026
24425cf
Move _type_utils.py to dpctl_ext/tensor
vlad-perevezentsev Feb 19, 2026
c88297c
Use import _type_utils from dpctl_ext
vlad-perevezentsev Feb 20, 2026
9207fc5
Move _broadcast_shape_impl to dpctl_ext/tenspr/_manipulation_fucntion…
vlad-perevezentsev Feb 20, 2026
ebbce34
Reuse can_cast() from dpctl_ext/tensor
vlad-perevezentsev Feb 20, 2026
6a13333
Reuse finfo(), iinfo(), isdtype() from dpctl_ext/tensor
vlad-perevezentsev Feb 20, 2026
de2c429
Reuse result_type() from dpctl_ext/tensor
vlad-perevezentsev Feb 20, 2026
9a97002
Move _scalar_utils.py to dpctl_ext/tensor
vlad-perevezentsev Feb 20, 2026
15c467d
Move where() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 20, 2026
134bb35
Update imports in dpnp/dpnp_iface_indexing.py
vlad-perevezentsev Feb 20, 2026
5fa6ee7
Merge move_tensor_impl_accum_bool_ind_eye into move_tensor_impl_repea…
vlad-perevezentsev Feb 20, 2026
c58b531
Enable -fno-fast-math compiler flag
vlad-perevezentsev Feb 20, 2026
4f00632
Move _clip to dpctl_ext/tensor/libtensor
vlad-perevezentsev Feb 20, 2026
5d45d85
Move clip() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 20, 2026
e70425b
Populate dispatch tables with where
vlad-perevezentsev Feb 20, 2026
36919c1
Move _linspace_step/_linspace_affine to dpctl_ext/tensor/libtensor
vlad-perevezentsev Feb 23, 2026
95ac4f7
Move ti.linspace() and reuse it in dpnp
vlad-perevezentsev Feb 23, 2026
1054e2d
Move ti.empty() and reuse it in dpctl_ext/tensor
vlad-perevezentsev Feb 23, 2026
d493454
Reuse dpctl_ext.tensor.empty() in dpnp
vlad-perevezentsev Feb 23, 2026
186ae3c
Move ti.empty_like() and reuse it in dpctl_ext/tensor
vlad-perevezentsev Feb 23, 2026
5503b9a
Reuse dpctl_ext.tensor.empty_like() in dpnp
vlad-perevezentsev Feb 23, 2026
748c5b5
Move ti.arange() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 23, 2026
a7370a8
Move ti.asarray() and reuse it in dpctl_ext/tensor
vlad-perevezentsev Feb 23, 2026
effcbe8
Reuse dpctl_ext.tensor.asarray() in dpnp
vlad-perevezentsev Feb 23, 2026
f9f547a
Move ti.full_like() to dpctl_ext/tensor
vlad-perevezentsev Feb 23, 2026
0d84d7b
Move ti.meshgrid() to dpctl_ext/tensor
vlad-perevezentsev Feb 23, 2026
8c15ddb
Move ti.ones() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 23, 2026
23d2229
Move ti.ones_like() to dpctl_ext/tensor
vlad-perevezentsev Feb 23, 2026
97dc7e1
Move ti.zeros() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev Feb 23, 2026
a6c397e
Move ti.zeros_like() to dpctl_ext/tensor
vlad-perevezentsev Feb 23, 2026
b8c5390
Move ti.broadcast_to() to dpctl_ext/tensor and reuse it in dpctl_ext/…
vlad-perevezentsev Feb 23, 2026
a7cbfdc
Reuse dpctl_ext.tensor.broadcast_to() in dpnp
vlad-perevezentsev Feb 23, 2026
bd265da
Move ti.broadcast_arrays() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
080c7d8
Move ti.concat() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
ea7ea3c
Move ti.expand_dims() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
d2e9279
Move ti.flip() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
4e63cca
Move ti.permute_dims() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
9c88edb
Move ti.moveaxis() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
ba51636
Move ti.squeeze() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
bb16c19
Move ti.stack() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
ccad5f0
Move ti.swapaxes() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
b5e3541
Move ti.tile() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
325729b
Move ti.unstack() to dpctl_ext.tensor and reuse it
vlad-perevezentsev Feb 23, 2026
4552e78
Initialize _tensor_accumulation_impl extension and move _cumsum_over_…
vlad-perevezentsev Feb 27, 2026
6b81e7a
Move ti.cumulative_sum() and reuse it in dpnp
vlad-perevezentsev Feb 27, 2026
5af94c8
Move _cumprod_over_axis to dpctl_ext.tensor._tensor_accumulation_impl
vlad-perevezentsev Mar 2, 2026
91547cc
Add missing include
vlad-perevezentsev Mar 2, 2026
668f3fb
Move ti.cumulative_prod() and reuse it in dpnp
vlad-perevezentsev Mar 2, 2026
72d2109
Move _cumlogsumexp_over_axis to dpctl_ext.tensor._tensor_accumulation…
vlad-perevezentsev Mar 2, 2026
d8c3680
Move ti.cumulative_logsumexp() and reuse it in dpnp
vlad-perevezentsev Mar 2, 2026
a1d9b0a
Extend ignore-words-list codespell
vlad-perevezentsev Mar 2, 2026
8a87fea
Move utils rich_comparisons.hpp file
vlad-perevezentsev Mar 2, 2026
43a7a04
Initialize _tensor_sorting_impl extension and move _radix_sort and py…
vlad-perevezentsev Mar 2, 2026
1f018ec
Move _sort_ascending/descending to dpctl_ext.tensor._tensor_sorting_impl
vlad-perevezentsev Mar 2, 2026
b62d836
Move ti.sort() and reuse it in dpnp
vlad-perevezentsev Mar 2, 2026
82d202c
Move ti.unique_counts() and ti.unique_values() to dpctl_ext.tensor
vlad-perevezentsev Mar 2, 2026
893cdc3
Move _radix_argsort_ascending/descending to _tensor_sorting_impl
vlad-perevezentsev Mar 2, 2026
40c2b84
Move _argsort_ascending/descending to _tensor_sorting_impl
vlad-perevezentsev Mar 2, 2026
6912311
Move ti.argsort() to dpctl_ext.tensor and reuse it in dpnp
vlad-perevezentsev Mar 2, 2026
88a23a2
Move _searchsorted_left/right to _tensor_sorting_impl
vlad-perevezentsev Mar 2, 2026
148b6e5
Fix bug: wrong shape pointer for positions array
vlad-perevezentsev Mar 2, 2026
8b010b0
Move ti.searchsorted() and reuse it in dpnp
vlad-perevezentsev Mar 2, 2026
9766d34
Move dpt.unique_all() and dpt.unique_inverse() and reuse it in dpnp
vlad-perevezentsev Mar 2, 2026
b8ad5ec
Move _isin to _tensor_sorting_impl
vlad-perevezentsev Mar 2, 2026
ce570a5
Fix bug: wrong shape pointer for dst array
vlad-perevezentsev Mar 2, 2026
a7c6440
Move dpt.isin() and reuse it in dpnp
vlad-perevezentsev Mar 2, 2026
62d19f1
Move _topk to _tensor_sorting_impl
vlad-perevezentsev Mar 2, 2026
56d397d
Move dpt.top_k()
vlad-perevezentsev Mar 2, 2026
ad814fb
Initialize _tensor_reductions_impl extension and move _all
vlad-perevezentsev Mar 3, 2026
c4f2496
Add TODO with incorrect logic in reductions_over_axis.hpp
vlad-perevezentsev Mar 3, 2026
bd3add0
Move ti.all() to dpctl_ext.tensor and reuse it in dpnp
vlad-perevezentsev Mar 3, 2026
b1953df
Move _any to _tensor_reductions_impl
vlad-perevezentsev Mar 3, 2026
32802d6
Move ti.any()/ti.diff() and reuse them in dpnp
vlad-perevezentsev Mar 3, 2026
1b4e498
Move _min_over_axis/_max_over_axis to _tensor_reductions_impl
vlad-perevezentsev Mar 3, 2026
aa313ff
Move ti.min()/max() and reuse it in dpnp
vlad-perevezentsev Mar 3, 2026
c6d600a
Move _argmax/argmin_over_axis to _tensor_reductions_impl
vlad-perevezentsev Mar 3, 2026
8ae933d
Move ti.argmax()/argmin() to dpctl_ext.tensor and reuse them in dpnp
vlad-perevezentsev Mar 3, 2026
2ec3cc7
Move _prod/sum_over_axis to _tensor_reductions_impl
vlad-perevezentsev Mar 3, 2026
6b27b1b
Move ti.sum()/prod() to dpctl_ext.tensor and reuse them in dpnp
vlad-perevezentsev Mar 3, 2026
3041d7d
Move _logsumexp/hypot_over_axis to _tensor_reductions_impl
vlad-perevezentsev Mar 3, 2026
4872bb6
Move ti.count_nonzero()/logsumexp()/reduce_hypot() to dpctl_ext.tenso…
vlad-perevezentsev Mar 3, 2026
58fdef3
Initialize _tensor_elementwise_impl extension and move _abs
vlad-perevezentsev Mar 3, 2026
d4cda7c
Move ti.abs() and reuse _abs in dpnp
vlad-perevezentsev Mar 3, 2026
ec74213
Move _acos/_acosh to _tensor_elementwise_impl
vlad-perevezentsev Mar 3, 2026
d4293a2
Move ti.acos()/acosh() and reuse them in dpnp
vlad-perevezentsev Mar 3, 2026
a548dbb
Move _angle/_asin/_asinh to _tensor_elementwise_impl
vlad-perevezentsev Mar 3, 2026
0cec8c3
Move ti.angel()/asin()/asinh() and reuse them
vlad-perevezentsev Mar 3, 2026
4e10a53
Move _atan/_atanh to _tensor_elementwise_impl
vlad-perevezentsev Mar 3, 2026
d509f6d
Move ti.atan()/atanh() and reuse them
vlad-perevezentsev Mar 3, 2026
e54114f
Move __bitwise_invert/_ceil/_conj to _tensor_elementwise_impl
vlad-perevezentsev Mar 3, 2026
e24b129
Move ti.bitwise_invert()/ceil()/conj() and reust them
vlad-perevezentsev Mar 3, 2026
a6100b8
Move _cos/_cosh to _tensor_elementwise_impl
vlad-perevezentsev Mar 4, 2026
e6d0d6f
Move ti.cos()/cosh() and reuse them
vlad-perevezentsev Mar 4, 2026
44ac844
Move _exp/_expmp/_floor to dpctl_ext.tensor and reuse them
vlad-perevezentsev Mar 4, 2026
eab5fec
Move ti.imag()/isfinite()/isfinite() and reuse them
vlad-perevezentsev Mar 4, 2026
4a8c05d
Move ti.isnan()/log()/log1p() and reuse them
vlad-perevezentsev Mar 4, 2026
6d9221c
Move ti.log2()/log10() and reuse them
vlad-perevezentsev Mar 4, 2026
7f444bd
Move ti.logical_not()/negative()/positive() and reuse them
vlad-perevezentsev Mar 4, 2026
dbf021a
Move ti.proj()/real()/round() and reuse them
vlad-perevezentsev Mar 4, 2026
0bc8973
Move ti.sign()/signbit()/sin()/sinh() and reuse them
vlad-perevezentsev Mar 4, 2026
a1707b2
Move ti.square()/sqrt()/tan()/tanh() and reuse them
vlad-perevezentsev Mar 4, 2026
0cdc3e4
Move ti.cbrt()/exp2()/reciprocal()/rsqrt()/trunc() and reuse them
vlad-perevezentsev Mar 4, 2026
3333fc1
add tensor linalg extension
ndgrigorian Mar 5, 2026
bdf3b18
Move helper logic for binary functions
vlad-perevezentsev Mar 5, 2026
d8aab36
Move ti.add() and reuse them
vlad-perevezentsev Mar 5, 2026
a51d34f
Move ti.atan2()/bitwise_and() and reuse them
vlad-perevezentsev Mar 5, 2026
ccb4c67
Move all binary bitwise functions and reuse them
vlad-perevezentsev Mar 5, 2026
fe7778d
Move ti.equal()/floor_divide()/divide() and reuse them
vlad-perevezentsev Mar 5, 2026
c73df9c
Move ti.greater()/greater_equal()/hypot() and reuse them
vlad-perevezentsev Mar 5, 2026
fefaa17
Move ti.less()/less_equal() and reuse them
vlad-perevezentsev Mar 5, 2026
28288ae
Move ti.logaddexp() and reuse it
vlad-perevezentsev Mar 5, 2026
1fb889d
Move all binary logical_ functions and reuse them
vlad-perevezentsev Mar 5, 2026
87f5529
Move ti.maximum()/minimum()/multiply() and reuse them
vlad-perevezentsev Mar 5, 2026
2d5d2ea
Move ti.nextafter()/not_equal()/pow() and reuse them
vlad-perevezentsev Mar 5, 2026
cab0b36
Move ti.copysign()/remainder()/subtract() and reuse them
vlad-perevezentsev Mar 5, 2026
ada8a5c
Merge include-dpctl-tensor into move_tensor_accumulation_impl
vlad-perevezentsev Mar 5, 2026
85ef3e0
Apply remarks
vlad-perevezentsev Mar 5, 2026
99c75cb
Use function from dpctl_ext.tensor in tensor python files
vlad-perevezentsev Mar 5, 2026
8dbf689
Move statistical functions to dpctl_ext.tensor and reuse them
vlad-perevezentsev Mar 5, 2026
e574a9a
Use _tensor_elementwise_impl from dpctl_ext
vlad-perevezentsev Mar 5, 2026
5a897c8
Add where to __init__
vlad-perevezentsev Mar 5, 2026
ecbc6a3
Move ti.allclose() to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
6e40f22
Merge move_tensor_accumulation_impl into move_tensor_sorting_impl
vlad-perevezentsev Mar 5, 2026
c9644ac
Merge move_tensor_sorting_impl into move_tensor_reductions_impl_ext
vlad-perevezentsev Mar 5, 2026
6a2c31b
Merge move_tensor_reductions_impl_ext into move_tensor_elementwise_im…
vlad-perevezentsev Mar 5, 2026
9339cb8
Merge move_tensor_elementwise_impl_unary into move_tensor_elementwise…
vlad-perevezentsev Mar 5, 2026
a506fe9
Merge move_tensor_elementwise_impl_unary_par_2 into move_tensor_eleme…
vlad-perevezentsev Mar 5, 2026
fc34f30
Merge move_tensor_elementwise_impl_unary_par_3 into move-tensor-linalg
vlad-perevezentsev Mar 5, 2026
c9efd4d
Merge move-tensor-linalg into move_elementwise_binary_impl
vlad-perevezentsev Mar 5, 2026
ee6ba17
Add missing logaddexp to __init__.py
vlad-perevezentsev Mar 5, 2026
d80285e
Merge move_elementwise_binary_impl into move_elementwise_binary_impl_…
vlad-perevezentsev Mar 5, 2026
c3d5ad7
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev Mar 5, 2026
a59ccd1
Merge move_elementwise_binary_impl_part_3 into finalize_functional_mi…
vlad-perevezentsev Mar 5, 2026
3bd1b0e
fix includes and namespaces in dot.cpp
ndgrigorian Mar 5, 2026
1620f77
use dpctl_ext.tensor throughout _linear_algebra_functions
ndgrigorian Mar 5, 2026
cb03a49
Move data types to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
93510c0
Move class Device to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
8e11b23
Move constants to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
54fe331
Move array API utilities
vlad-perevezentsev Mar 5, 2026
60bba8f
Move print functions to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
b4fa023
Move include/dlpack to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
fb8b77e
Move _dlpack.pyx/pxd to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
5c9e183
Move _flags.pyx to dpctl_ext.tensor
vlad-perevezentsev Mar 5, 2026
8f44c37
Move cython helper files
vlad-perevezentsev Mar 6, 2026
e2441eb
Move dldevice_conversions functions
vlad-perevezentsev Mar 6, 2026
422e87e
Move usm_ndarray to dpctl_ext.tensor
vlad-perevezentsev Mar 6, 2026
75580a5
fix clang-format
ndgrigorian Mar 6, 2026
e114808
Fix import _flags and _dlpack in _usmarray.pyx
vlad-perevezentsev Mar 6, 2026
39c0571
Update CMakes files to build usm_ndarray
vlad-perevezentsev Mar 6, 2026
7e6a283
abbreviate namespaces in linalg module sources and headers
ndgrigorian Mar 6, 2026
3c428a6
Switch fully to dpctl_ext.tensor in dpctl_ext.tensor
vlad-perevezentsev Mar 6, 2026
3883a1c
Switch fully to dpctl_ext.tensor in dpnp
vlad-perevezentsev Mar 6, 2026
23164ac
Reorder _usmarray import in __init__.py
vlad-perevezentsev Mar 6, 2026
18c3d61
Add missing _place_impl() to _copy_utils.py
vlad-perevezentsev Mar 6, 2026
7f14dfc
Update _dlpack.pyx to use dpctl_ext.tensor
vlad-perevezentsev Mar 6, 2026
5e7123d
Update _usmarray.pyx to use dpctl_ext.tensor
vlad-perevezentsev Mar 6, 2026
f4da0de
Integrate dpctl_ext.tensor C-API to dpnp4pybind11.hpp
vlad-perevezentsev Mar 6, 2026
1e4902d
Add from_dlpack to API dpctl_ext.tensor
vlad-perevezentsev Mar 9, 2026
9a50f9f
Extend .gitignore for dpctl_ext/include
vlad-perevezentsev Mar 9, 2026
153a91b
Add DpctlExtCAPI interface target
vlad-perevezentsev Mar 9, 2026
95acc3d
Increase build time for public CI
vlad-perevezentsev Mar 9, 2026
f55507d
Update test_from_dlpack_with_dpt to use dpt.empty
vlad-perevezentsev Mar 10, 2026
5d11ff7
Merge include-dpctl-tensor into move_tensor_elementwise_impl_unary
vlad-perevezentsev Mar 11, 2026
281adbf
Apply remarks
vlad-perevezentsev Mar 11, 2026
7b63ab5
Merge move_tensor_elementwise_impl_unary into move_tensor_elementwise…
vlad-perevezentsev Mar 11, 2026
a2d28af
Clean-up includes
vlad-perevezentsev Mar 11, 2026
1403be4
Merge move_tensor_elementwise_impl_unary_par_2 into move_tensor_eleme…
vlad-perevezentsev Mar 11, 2026
0182c74
Clean-up includes
vlad-perevezentsev Mar 11, 2026
86878cf
Merge move_tensor_elementwise_impl_unary_par_3 into move-tensor-linalg
vlad-perevezentsev Mar 11, 2026
c0ff29f
Add the missing includes for dot.cpp
vlad-perevezentsev Mar 11, 2026
ca295f1
Merge move-tensor-linalg into move_elementwise_binary_impl
vlad-perevezentsev Mar 11, 2026
e6e179e
Clean-up includes
vlad-perevezentsev Mar 11, 2026
ed289fc
Merge move_elementwise_binary_impl into move_elementwise_binary_impl_…
vlad-perevezentsev Mar 11, 2026
a3b2d00
Clean-up includes
vlad-perevezentsev Mar 11, 2026
d4ca39b
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev Mar 11, 2026
b467db5
Clean-up includes
vlad-perevezentsev Mar 11, 2026
608802a
Clean-up includes
vlad-perevezentsev Mar 11, 2026
b614202
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev Mar 11, 2026
f4c05d2
Merge move_elementwise_binary_impl_part_3 into finalize_functional_mi…
vlad-perevezentsev Mar 11, 2026
9a7fae9
Merge finalize_functional_migration into move_usm_ndarray
vlad-perevezentsev Mar 11, 2026
3ba741a
Add public C-API header for dpctl_ext
vlad-perevezentsev Mar 17, 2026
946ce93
Move dpctl C-API imports to dpctl_ext_capi.h
vlad-perevezentsev Mar 17, 2026
da0995c
Remove the workaround via CMAKE_BINARY_DIR from DpctlExtCAPI
vlad-perevezentsev Mar 17, 2026
31685d4
Disable pylint check no-name-in-module in dpnp_iface_statistics.py
vlad-perevezentsev Mar 17, 2026
fddedde
Merge include-dpctl-tensor into move_elementwise_binary_impl_part_2
vlad-perevezentsev Mar 18, 2026
969ec9a
Add a missing include
vlad-perevezentsev Mar 18, 2026
b0a4a6e
Apply remarks
vlad-perevezentsev Mar 18, 2026
21f1aec
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev Mar 18, 2026
255a20b
Merge include-dpctl-tensor into move_elementwise_binary_impl_part_3
vlad-perevezentsev Mar 18, 2026
d00ebe4
Clean up includes
vlad-perevezentsev Mar 18, 2026
1a4f450
Merge move_elementwise_binary_impl_part_3 into finalize_functional_mi…
vlad-perevezentsev Mar 18, 2026
ed51252
Merge finalize_functional_migration into move_usm_ndarray
vlad-perevezentsev Mar 18, 2026
b4395ea
Increase timeout_minutes for build dpnp with coverage step
vlad-perevezentsev Mar 18, 2026
7327502
Increase timeout-minutes for Build and Deploy Docs
vlad-perevezentsev Mar 18, 2026
42a6ada
Merge include-dpctl-tensor into finalize_functional_migration
vlad-perevezentsev Mar 19, 2026
bc52234
Update test_from_dlpack_with_dpt to use empty from dpctl_ext
vlad-perevezentsev Mar 19, 2026
8adaa68
Fully switch to using dpctl_ext functions for dpnp_elementwise_common.py
vlad-perevezentsev Mar 19, 2026
0277672
Update _testing.py in dpctl_ext/tensor
vlad-perevezentsev Mar 19, 2026
11562a2
Merge finalize_functional_migration into move_usm_ndarray
vlad-perevezentsev Mar 19, 2026
fd763f3
Merge include-dpctl-tensor into move_usm_ndarray
vlad-perevezentsev Mar 19, 2026
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 .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Build and Deploy Docs

runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 90

permissions:
# Needed to cancel any previous runs that are not completed for a given workflow
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
shell: bash
timeout_minutes: 60
timeout_minutes: 90
max_attempts: 5
retry_on: error
command: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ core
# TODO: revert to `dpctl/`
# when dpnp fully migrates dpctl/tensor
dpctl_ext/**/*.cpython*.so
dpctl_ext/include/
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,16 @@ if(DEFINED SKBUILD)
set(_ignore_me ${SKBUILD})
endif()

add_subdirectory(dpnp)
# DpctlExtCAPI: Interface library for dpctl_ext C-API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a temporary approach, or do we need to define interface lib even when it will be exposed by dpctl when the migration is completed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a design decision either way: dpctl exposed PyUSMArrayObject for numba-dpex's sake. So this way, usm_ndarray would be exposed to C-API and could be interacted with from C code conveniently.

It could be removed, in which case, the api methods like i.e., cdef api char* UsmNDArray_GetData could also be removed (barring causing any problems in the dpctl_ext).

# Provides access to:
# 1. Public C-API headers from dpctl_ext/apis/include
# 2. Generated Cython headers via per-target header interface libraries

add_library(DpctlExtCAPI INTERFACE)
target_include_directories(
DpctlExtCAPI
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/dpctl_ext/apis/include
)

add_subdirectory(dpctl_ext)
add_subdirectory(dpnp)
93 changes: 92 additions & 1 deletion dpctl_ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,99 @@ else()
endif()

# at build time create include/ directory and copy header files over
# set(DPCTL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(DPCTL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

set(CMAKE_INSTALL_RPATH "$ORIGIN")

function(build_dpctl_ext _trgt _src _dest)
set(options SYCL)
cmake_parse_arguments(BUILD_DPCTL_EXT "${options}" "RELATIVE_PATH" "" ${ARGN})
add_cython_target(${_trgt} ${_src} CXX OUTPUT_VAR _generated_src)
set(_cythonize_trgt "${_trgt}_cythonize_pyx")
python_add_library(${_trgt} MODULE WITH_SOABI ${_generated_src})
if(BUILD_DPCTL_EXT_SYCL)
add_sycl_to_target(TARGET ${_trgt} SOURCES ${_generated_src})
target_compile_options(${_trgt} PRIVATE -fno-sycl-id-queries-fit-in-int)
target_link_options(${_trgt} PRIVATE -fsycl-device-code-split=per_kernel)
if(DPCTL_OFFLOAD_COMPRESS)
target_link_options(${_trgt} PRIVATE --offload-compress)
endif()
if(_dpctl_sycl_targets)
# make fat binary
target_compile_options(
${_trgt}
PRIVATE ${_dpctl_sycl_target_compile_options}
)
target_link_options(${_trgt} PRIVATE ${_dpctl_sycl_target_link_options})
endif()
endif()
target_link_libraries(${_trgt} PRIVATE Python::NumPy)
if(DPCTL_GENERATE_COVERAGE)
target_compile_definitions(${_trgt} PRIVATE CYTHON_TRACE=1 CYTHON_TRACE_NOGIL=1)
if(BUILD_DPCTL_EXT_SYCL)
target_compile_options(${_trgt} PRIVATE -fno-sycl-use-footer)
endif()
endif()
# Dpctl
target_include_directories(${_trgt} PRIVATE ${Dpctl_INCLUDE_DIR})
target_link_directories(${_trgt} PRIVATE ${Dpctl_INCLUDE_DIR}/..)
target_link_libraries(${_trgt} PRIVATE DPCTLSyclInterface)
set(_linker_options "LINKER:${DPCTL_LDFLAGS}")
target_link_options(${_trgt} PRIVATE ${_linker_options})
get_filename_component(_name_wle ${_generated_src} NAME_WLE)
get_filename_component(_generated_src_dir ${_generated_src} DIRECTORY)
set(_generated_public_h "${_generated_src_dir}/${_name_wle}.h")
set(_generated_api_h "${_generated_src_dir}/${_name_wle}_api.h")

# TODO: create separate folder inside build folder that contains only
# headers related to this target and appropriate folder structure to
# eliminate shadow dependencies
# Go up two levels to build root for "dpctl_ext/tensor/_usmarray.h" resolution
get_filename_component(_parent_dir ${_generated_src_dir} DIRECTORY)
get_filename_component(_build_root ${_parent_dir} DIRECTORY)
# TODO: do not set directory if we did not generate header
target_include_directories(${_trgt} INTERFACE ${_build_root})
set(_rpath_value "$ORIGIN")
if(BUILD_DPCTL_EXT_RELATIVE_PATH)
set(_rpath_value "${_rpath_value}/${BUILD_DPCTL_EXT_RELATIVE_PATH}")
endif()
if(DPCTL_WITH_REDIST)
set(_rpath_value "${_rpath_value}:${_rpath_value}/../../..")
endif()
set_target_properties(${_trgt} PROPERTIES INSTALL_RPATH ${_rpath_value})

install(TARGETS ${_trgt} LIBRARY DESTINATION ${_dest})
install(
FILES ${_generated_api_h}
DESTINATION ${CMAKE_INSTALL_PREFIX}/dpctl_ext/include/${_dest}
OPTIONAL
)
install(
FILES ${_generated_public_h}
DESTINATION ${CMAKE_INSTALL_PREFIX}/dpctl_ext/include/${_dest}
OPTIONAL
)
if(DPCTL_GENERATE_COVERAGE)
get_filename_component(_original_src_dir ${_src} DIRECTORY)
file(RELATIVE_PATH _rel_dir ${CMAKE_SOURCE_DIR} ${_original_src_dir})
install(FILES ${_generated_src} DESTINATION ${CMAKE_INSTALL_PREFIX}/${_rel_dir})
endif()

# Create target with headers only, because python is managing all the
# library imports at runtime
set(_trgt_headers ${_trgt}_headers)
add_library(${_trgt_headers} INTERFACE)
add_dependencies(${_trgt_headers} ${_trgt})
get_target_property(_trgt_headers_dir ${_trgt} INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(${_trgt_headers} INTERFACE ${_trgt_headers_dir})
endfunction()

# Install dpctl_ext C-API headers (similar to dpctl's C-API installation)
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/apis/include/
DESTINATION ${CMAKE_INSTALL_PREFIX}/dpctl_ext/include
FILES_MATCHING
REGEX "\\.h(pp)?$"
)

add_subdirectory(tensor)
106 changes: 106 additions & 0 deletions dpctl_ext/apis/include/dpctl_ext_capi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
//*****************************************************************************
// Copyright (c) 2026, Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// - Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//*****************************************************************************
//
//===---------------------------------------------------------------------===//
///
/// \file
/// This file provides access to dpctl_ext's C-API, including:
/// - dpctl C-API (from external dpctl package - SYCL interface)
/// - dpctl_ext tensor C-API (usm_ndarray)
//===---------------------------------------------------------------------===//

#pragma once

// Include dpctl C-API headers explicitly from external dpctl package (SYCL
// interface)
// TODO: Once dpctl removes its tensor module and stabilizes dpctl_capi.h,
// we can simplify to just: #include "dpctl_capi.h"
// For now, explicit includes ensure we only get SYCL interface without tensor.

#include "syclinterface/dpctl_sycl_extension_interface.h"
#include "syclinterface/dpctl_sycl_types.h"

#ifdef __cplusplus
#define CYTHON_EXTERN_C extern "C"
#else
#define CYTHON_EXTERN_C
#endif

#include "dpctl/_sycl_context.h"
#include "dpctl/_sycl_context_api.h"
#include "dpctl/_sycl_device.h"
#include "dpctl/_sycl_device_api.h"
#include "dpctl/_sycl_event.h"
#include "dpctl/_sycl_event_api.h"
#include "dpctl/_sycl_queue.h"
#include "dpctl/_sycl_queue_api.h"
#include "dpctl/memory/_memory.h"
#include "dpctl/memory/_memory_api.h"
#include "dpctl/program/_program.h"
#include "dpctl/program/_program_api.h"

// Include the generated Cython C-API headers for usm_ndarray
// These headers are generated during build and placed in the build directory
#include "dpctl_ext/tensor/_usmarray.h"
#include "dpctl_ext/tensor/_usmarray_api.h"

/*
* Function to import dpctl_ext C-API and make it available.
* This imports both:
* - dpctl C-API (from external dpctl package - SYCL interface)
* - dpctl_ext C-API (tensor interface - usm_ndarray)
*
* C functions can use dpctl_ext's C-API functions without linking to
* shared objects defining these symbols, if they call `import_dpctl_ext()`
* prior to using those symbols.
*
* It is declared inline to allow multiple definitions in
* different translation units.
*
* TODO: When dpctl_ext is renamed to dpctl.tensor:
* - Rename this file: dpctl_ext_capi.h → dpctl/tensor/tensor_capi.h
* (Use tensor_capi.h, NOT dpctl_capi.h, to avoid conflict with external
* dpctl)
* - Rename this function: import_dpctl_ext() → import_dpctl_tensor()
* - Include external dpctl_capi.h and simplify imports to use import_dpctl()
*/
static inline void import_dpctl_ext(void)
{
// Import dpctl SYCL interface
// TODO: Once dpctl removes its tensor module and stabilizes dpctl_capi.h,
// we can simplify to just: import_dpctl()
import_dpctl___sycl_device();
import_dpctl___sycl_context();
import_dpctl___sycl_event();
import_dpctl___sycl_queue();
import_dpctl__memory___memory();
import_dpctl__program___program();
// Import dpctl_ext tensor interface
import_dpctl_ext__tensor___usmarray();
return;
}
10 changes: 10 additions & 0 deletions dpctl_ext/tensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@

find_package(Python COMPONENTS Development.Module)

file(GLOB _cython_sources *.pyx)
foreach(_cy_file ${_cython_sources})
get_filename_component(_trgt ${_cy_file} NAME_WLE)
build_dpctl_ext(${_trgt} ${_cy_file} "dpctl_ext/tensor" RELATIVE_PATH "..")
target_include_directories(${_trgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
# target_link_libraries(DpctlCAPI INTERFACE ${_trgt}_headers)
target_link_libraries(DpctlExtCAPI INTERFACE ${_trgt}_headers)
endforeach()

if(WIN32)
if(${CMAKE_VERSION} VERSION_LESS "3.27")
# this is a work-around for target_link_options inserting option after -link option, cause
Expand Down Expand Up @@ -338,6 +347,7 @@ foreach(python_module_name ${_py_trgts})
# dpctl4pybind11.hpp. It will allow to simplify dependency tree
# NOTE: dpctl C-API is resolved at runtime via Python
# target_link_libraries(${python_module_name} PRIVATE DpctlCAPI)
target_link_libraries(${python_module_name} PRIVATE DpctlExtCAPI)
if(DPNP_WITH_REDIST)
set_target_properties(
${python_module_name}
Expand Down
36 changes: 36 additions & 0 deletions dpctl_ext/tensor/__init__.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# *****************************************************************************
# Copyright (c) 2026, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# - Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
# *****************************************************************************

""" This file declares the extension types and functions for the Cython API
implemented in _usmarray.pyx file.
"""

# distutils: language = c++
# cython: language_level=3

from ._usmarray cimport *
Loading
Loading