-
Notifications
You must be signed in to change notification settings - Fork 26
Move usm_ndarray into dpctl_ext.tensor
#2807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vlad-perevezentsev
wants to merge
264
commits into
include-dpctl-tensor
Choose a base branch
from
move_usm_ndarray
base: include-dpctl-tensor
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7,519
−649
Open
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 d50f263
Use full and _full_usm_ndarray from dpctl_ext in dpnp
vlad-perevezentsev f189dc5
Update .gitignore to ignore .so files in dpctl_ext
vlad-perevezentsev f9a1817
Move _zeros_usm_ndarray to dpctl_ext
vlad-perevezentsev 4b8505a
Use _zeros_usm_ndarray from dpctl_ext in dpnp_fill.py
vlad-perevezentsev 61106b2
Move linear-sequence implementations to dpctl_ext/tensor
vlad-perevezentsev a030579
Use _tensor_impl from dpctl_ext in dpnp_utils_fft.py
vlad-perevezentsev a1d6fa3
Move tril()/triu() to dpctl_ext/tensor
vlad-perevezentsev f1d6e56
Use tril/triu/_tril from dpctl_ext.tensor in dpnp
vlad-perevezentsev 6680790
Disable pylint no-name-in-module for dpctl_ext
vlad-perevezentsev 263b717
Add TODO comments
vlad-perevezentsev 4130c1b
Use default_device_complex_type from dpctl_ext on test_array_api_info.py
vlad-perevezentsev 17ca9ab
Remove unused build_dpctl_ext function
vlad-perevezentsev 79cb2a4
Apply remarks for CMake files
vlad-perevezentsev 4bf080e
Apply remarks for c++ files
vlad-perevezentsev cfa6cd6
Remove linear-sequence implementations
vlad-perevezentsev e0e50ac
Merge move_tensor_impl_ext into move_tensor_impl_ext_part_2
vlad-perevezentsev 087a2ec
Use _tensor_impl from dpctl_ext in dpnp
vlad-perevezentsev f4492fb
Add missing include
vlad-perevezentsev b367c9f
Use nested namespace syntax
vlad-perevezentsev 3113716
Add missing include complex
vlad-perevezentsev 978afee
Add missing memory and queue checks
vlad-perevezentsev fec84ec
Move ti._copy_numpy_ndarray_into_usm_ndarray()
vlad-perevezentsev 497e810
Move asnumpy(),from_numpy(), to_numpy() to dpctl_ext/tensor
vlad-perevezentsev 3be4e14
Update dpnp.asnumpy to use dpctl_ext functions
vlad-perevezentsev 1d88365
Move copy(), astype() to dpctl_ext/tensor
vlad-perevezentsev fd18db0
reuse astype(), copy() from dpctl_ext
vlad-perevezentsev 0976171
Move _copy_usm_ndarray_for_reshape
vlad-perevezentsev 318692e
Move reshape() to dpctl_ext/tensor
vlad-perevezentsev 3c0c113
Reuse reshape from dpctl_ext in dpnp
vlad-perevezentsev 30f2c53
Move _copy_usm_ndarray_for_roll
vlad-perevezentsev 85c29da
Move roll() to dpctl_ext/tensor
vlad-perevezentsev 6e8d857
Update dpnp.roll to use dpctl_ext
vlad-perevezentsev 19e93b9
Update .gitignore to ignore .so files in dpctl_ext
vlad-perevezentsev b111e49
Remove unused includes in tensor_ctors.cpp
vlad-perevezentsev c082224
Use Python::Module for dpctl_ext static lib to avoid libpython depend…
vlad-perevezentsev 9e7deb3
Merge move_tensor_impl_ext into move_tensor_impl_ext_part_2
vlad-perevezentsev 1a736f7
Merge include-dpctl-tensor into move_tensor_impl_ext_part_2
vlad-perevezentsev 8bde614
Merge move_tensor_impl_ext_part_2 into move_tensor_impl_copy
vlad-perevezentsev c3bc8ba
Move ti.mask_positions() and ti._cumsum_1d()
vlad-perevezentsev 69b36b2
Move ti._extract(), ti._place(), ti._nonzero()
vlad-perevezentsev 70a0fc6
Move place() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev afa5411
Move extract() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev 7feb4ee
Move nonzero() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev f63f2f0
Move put_along_axis to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev 6fecefe
Move take_along_axis() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev b60d095
Move ti._eye to() to dpctl_ext/tensor/libtensor
vlad-perevezentsev a1eea4e
Move eye() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev 95ccf70
Move ti._repeat... to dpctl_ext/tensor
vlad-perevezentsev 43f97cf
Move repeat() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev 9b248f4
Move ti._where() to dpctl_ext/tensor/libtensor
vlad-perevezentsev 24425cf
Move _type_utils.py to dpctl_ext/tensor
vlad-perevezentsev c88297c
Use import _type_utils from dpctl_ext
vlad-perevezentsev 9207fc5
Move _broadcast_shape_impl to dpctl_ext/tenspr/_manipulation_fucntion…
vlad-perevezentsev ebbce34
Reuse can_cast() from dpctl_ext/tensor
vlad-perevezentsev 6a13333
Reuse finfo(), iinfo(), isdtype() from dpctl_ext/tensor
vlad-perevezentsev de2c429
Reuse result_type() from dpctl_ext/tensor
vlad-perevezentsev 9a97002
Move _scalar_utils.py to dpctl_ext/tensor
vlad-perevezentsev 15c467d
Move where() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev 134bb35
Update imports in dpnp/dpnp_iface_indexing.py
vlad-perevezentsev 5fa6ee7
Merge move_tensor_impl_accum_bool_ind_eye into move_tensor_impl_repea…
vlad-perevezentsev c58b531
Enable -fno-fast-math compiler flag
vlad-perevezentsev 4f00632
Move _clip to dpctl_ext/tensor/libtensor
vlad-perevezentsev 5d45d85
Move clip() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev e70425b
Populate dispatch tables with where
vlad-perevezentsev 36919c1
Move _linspace_step/_linspace_affine to dpctl_ext/tensor/libtensor
vlad-perevezentsev 95ac4f7
Move ti.linspace() and reuse it in dpnp
vlad-perevezentsev 1054e2d
Move ti.empty() and reuse it in dpctl_ext/tensor
vlad-perevezentsev d493454
Reuse dpctl_ext.tensor.empty() in dpnp
vlad-perevezentsev 186ae3c
Move ti.empty_like() and reuse it in dpctl_ext/tensor
vlad-perevezentsev 5503b9a
Reuse dpctl_ext.tensor.empty_like() in dpnp
vlad-perevezentsev 748c5b5
Move ti.arange() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev a7370a8
Move ti.asarray() and reuse it in dpctl_ext/tensor
vlad-perevezentsev effcbe8
Reuse dpctl_ext.tensor.asarray() in dpnp
vlad-perevezentsev f9f547a
Move ti.full_like() to dpctl_ext/tensor
vlad-perevezentsev 0d84d7b
Move ti.meshgrid() to dpctl_ext/tensor
vlad-perevezentsev 8c15ddb
Move ti.ones() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev 23d2229
Move ti.ones_like() to dpctl_ext/tensor
vlad-perevezentsev 97dc7e1
Move ti.zeros() to dpctl_ext/tensor and reuse it in dpnp
vlad-perevezentsev a6c397e
Move ti.zeros_like() to dpctl_ext/tensor
vlad-perevezentsev b8c5390
Move ti.broadcast_to() to dpctl_ext/tensor and reuse it in dpctl_ext/…
vlad-perevezentsev a7cbfdc
Reuse dpctl_ext.tensor.broadcast_to() in dpnp
vlad-perevezentsev bd265da
Move ti.broadcast_arrays() to dpctl_ext.tensor and reuse it
vlad-perevezentsev 080c7d8
Move ti.concat() to dpctl_ext.tensor and reuse it
vlad-perevezentsev ea7ea3c
Move ti.expand_dims() to dpctl_ext.tensor and reuse it
vlad-perevezentsev d2e9279
Move ti.flip() to dpctl_ext.tensor and reuse it
vlad-perevezentsev 4e63cca
Move ti.permute_dims() to dpctl_ext.tensor and reuse it
vlad-perevezentsev 9c88edb
Move ti.moveaxis() to dpctl_ext.tensor and reuse it
vlad-perevezentsev ba51636
Move ti.squeeze() to dpctl_ext.tensor and reuse it
vlad-perevezentsev bb16c19
Move ti.stack() to dpctl_ext.tensor and reuse it
vlad-perevezentsev ccad5f0
Move ti.swapaxes() to dpctl_ext.tensor and reuse it
vlad-perevezentsev b5e3541
Move ti.tile() to dpctl_ext.tensor and reuse it
vlad-perevezentsev 325729b
Move ti.unstack() to dpctl_ext.tensor and reuse it
vlad-perevezentsev 4552e78
Initialize _tensor_accumulation_impl extension and move _cumsum_over_…
vlad-perevezentsev 6b81e7a
Move ti.cumulative_sum() and reuse it in dpnp
vlad-perevezentsev 5af94c8
Move _cumprod_over_axis to dpctl_ext.tensor._tensor_accumulation_impl
vlad-perevezentsev 91547cc
Add missing include
vlad-perevezentsev 668f3fb
Move ti.cumulative_prod() and reuse it in dpnp
vlad-perevezentsev 72d2109
Move _cumlogsumexp_over_axis to dpctl_ext.tensor._tensor_accumulation…
vlad-perevezentsev d8c3680
Move ti.cumulative_logsumexp() and reuse it in dpnp
vlad-perevezentsev a1d9b0a
Extend ignore-words-list codespell
vlad-perevezentsev 8a87fea
Move utils rich_comparisons.hpp file
vlad-perevezentsev 43a7a04
Initialize _tensor_sorting_impl extension and move _radix_sort and py…
vlad-perevezentsev 1f018ec
Move _sort_ascending/descending to dpctl_ext.tensor._tensor_sorting_impl
vlad-perevezentsev b62d836
Move ti.sort() and reuse it in dpnp
vlad-perevezentsev 82d202c
Move ti.unique_counts() and ti.unique_values() to dpctl_ext.tensor
vlad-perevezentsev 893cdc3
Move _radix_argsort_ascending/descending to _tensor_sorting_impl
vlad-perevezentsev 40c2b84
Move _argsort_ascending/descending to _tensor_sorting_impl
vlad-perevezentsev 6912311
Move ti.argsort() to dpctl_ext.tensor and reuse it in dpnp
vlad-perevezentsev 88a23a2
Move _searchsorted_left/right to _tensor_sorting_impl
vlad-perevezentsev 148b6e5
Fix bug: wrong shape pointer for positions array
vlad-perevezentsev 8b010b0
Move ti.searchsorted() and reuse it in dpnp
vlad-perevezentsev 9766d34
Move dpt.unique_all() and dpt.unique_inverse() and reuse it in dpnp
vlad-perevezentsev b8ad5ec
Move _isin to _tensor_sorting_impl
vlad-perevezentsev ce570a5
Fix bug: wrong shape pointer for dst array
vlad-perevezentsev a7c6440
Move dpt.isin() and reuse it in dpnp
vlad-perevezentsev 62d19f1
Move _topk to _tensor_sorting_impl
vlad-perevezentsev 56d397d
Move dpt.top_k()
vlad-perevezentsev ad814fb
Initialize _tensor_reductions_impl extension and move _all
vlad-perevezentsev c4f2496
Add TODO with incorrect logic in reductions_over_axis.hpp
vlad-perevezentsev bd3add0
Move ti.all() to dpctl_ext.tensor and reuse it in dpnp
vlad-perevezentsev b1953df
Move _any to _tensor_reductions_impl
vlad-perevezentsev 32802d6
Move ti.any()/ti.diff() and reuse them in dpnp
vlad-perevezentsev 1b4e498
Move _min_over_axis/_max_over_axis to _tensor_reductions_impl
vlad-perevezentsev aa313ff
Move ti.min()/max() and reuse it in dpnp
vlad-perevezentsev c6d600a
Move _argmax/argmin_over_axis to _tensor_reductions_impl
vlad-perevezentsev 8ae933d
Move ti.argmax()/argmin() to dpctl_ext.tensor and reuse them in dpnp
vlad-perevezentsev 2ec3cc7
Move _prod/sum_over_axis to _tensor_reductions_impl
vlad-perevezentsev 6b27b1b
Move ti.sum()/prod() to dpctl_ext.tensor and reuse them in dpnp
vlad-perevezentsev 3041d7d
Move _logsumexp/hypot_over_axis to _tensor_reductions_impl
vlad-perevezentsev 4872bb6
Move ti.count_nonzero()/logsumexp()/reduce_hypot() to dpctl_ext.tenso…
vlad-perevezentsev 58fdef3
Initialize _tensor_elementwise_impl extension and move _abs
vlad-perevezentsev d4cda7c
Move ti.abs() and reuse _abs in dpnp
vlad-perevezentsev ec74213
Move _acos/_acosh to _tensor_elementwise_impl
vlad-perevezentsev d4293a2
Move ti.acos()/acosh() and reuse them in dpnp
vlad-perevezentsev a548dbb
Move _angle/_asin/_asinh to _tensor_elementwise_impl
vlad-perevezentsev 0cec8c3
Move ti.angel()/asin()/asinh() and reuse them
vlad-perevezentsev 4e10a53
Move _atan/_atanh to _tensor_elementwise_impl
vlad-perevezentsev d509f6d
Move ti.atan()/atanh() and reuse them
vlad-perevezentsev e54114f
Move __bitwise_invert/_ceil/_conj to _tensor_elementwise_impl
vlad-perevezentsev e24b129
Move ti.bitwise_invert()/ceil()/conj() and reust them
vlad-perevezentsev a6100b8
Move _cos/_cosh to _tensor_elementwise_impl
vlad-perevezentsev e6d0d6f
Move ti.cos()/cosh() and reuse them
vlad-perevezentsev 44ac844
Move _exp/_expmp/_floor to dpctl_ext.tensor and reuse them
vlad-perevezentsev eab5fec
Move ti.imag()/isfinite()/isfinite() and reuse them
vlad-perevezentsev 4a8c05d
Move ti.isnan()/log()/log1p() and reuse them
vlad-perevezentsev 6d9221c
Move ti.log2()/log10() and reuse them
vlad-perevezentsev 7f444bd
Move ti.logical_not()/negative()/positive() and reuse them
vlad-perevezentsev dbf021a
Move ti.proj()/real()/round() and reuse them
vlad-perevezentsev 0bc8973
Move ti.sign()/signbit()/sin()/sinh() and reuse them
vlad-perevezentsev a1707b2
Move ti.square()/sqrt()/tan()/tanh() and reuse them
vlad-perevezentsev 0cdc3e4
Move ti.cbrt()/exp2()/reciprocal()/rsqrt()/trunc() and reuse them
vlad-perevezentsev 3333fc1
add tensor linalg extension
ndgrigorian bdf3b18
Move helper logic for binary functions
vlad-perevezentsev d8aab36
Move ti.add() and reuse them
vlad-perevezentsev a51d34f
Move ti.atan2()/bitwise_and() and reuse them
vlad-perevezentsev ccb4c67
Move all binary bitwise functions and reuse them
vlad-perevezentsev fe7778d
Move ti.equal()/floor_divide()/divide() and reuse them
vlad-perevezentsev c73df9c
Move ti.greater()/greater_equal()/hypot() and reuse them
vlad-perevezentsev fefaa17
Move ti.less()/less_equal() and reuse them
vlad-perevezentsev 28288ae
Move ti.logaddexp() and reuse it
vlad-perevezentsev 1fb889d
Move all binary logical_ functions and reuse them
vlad-perevezentsev 87f5529
Move ti.maximum()/minimum()/multiply() and reuse them
vlad-perevezentsev 2d5d2ea
Move ti.nextafter()/not_equal()/pow() and reuse them
vlad-perevezentsev cab0b36
Move ti.copysign()/remainder()/subtract() and reuse them
vlad-perevezentsev ada8a5c
Merge include-dpctl-tensor into move_tensor_accumulation_impl
vlad-perevezentsev 85ef3e0
Apply remarks
vlad-perevezentsev 99c75cb
Use function from dpctl_ext.tensor in tensor python files
vlad-perevezentsev 8dbf689
Move statistical functions to dpctl_ext.tensor and reuse them
vlad-perevezentsev e574a9a
Use _tensor_elementwise_impl from dpctl_ext
vlad-perevezentsev 5a897c8
Add where to __init__
vlad-perevezentsev ecbc6a3
Move ti.allclose() to dpctl_ext.tensor
vlad-perevezentsev 6e40f22
Merge move_tensor_accumulation_impl into move_tensor_sorting_impl
vlad-perevezentsev c9644ac
Merge move_tensor_sorting_impl into move_tensor_reductions_impl_ext
vlad-perevezentsev 6a2c31b
Merge move_tensor_reductions_impl_ext into move_tensor_elementwise_im…
vlad-perevezentsev 9339cb8
Merge move_tensor_elementwise_impl_unary into move_tensor_elementwise…
vlad-perevezentsev a506fe9
Merge move_tensor_elementwise_impl_unary_par_2 into move_tensor_eleme…
vlad-perevezentsev fc34f30
Merge move_tensor_elementwise_impl_unary_par_3 into move-tensor-linalg
vlad-perevezentsev c9efd4d
Merge move-tensor-linalg into move_elementwise_binary_impl
vlad-perevezentsev ee6ba17
Add missing logaddexp to __init__.py
vlad-perevezentsev d80285e
Merge move_elementwise_binary_impl into move_elementwise_binary_impl_…
vlad-perevezentsev c3d5ad7
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev a59ccd1
Merge move_elementwise_binary_impl_part_3 into finalize_functional_mi…
vlad-perevezentsev 3bd1b0e
fix includes and namespaces in dot.cpp
ndgrigorian 1620f77
use dpctl_ext.tensor throughout _linear_algebra_functions
ndgrigorian cb03a49
Move data types to dpctl_ext.tensor
vlad-perevezentsev 93510c0
Move class Device to dpctl_ext.tensor
vlad-perevezentsev 8e11b23
Move constants to dpctl_ext.tensor
vlad-perevezentsev 54fe331
Move array API utilities
vlad-perevezentsev 60bba8f
Move print functions to dpctl_ext.tensor
vlad-perevezentsev b4fa023
Move include/dlpack to dpctl_ext.tensor
vlad-perevezentsev fb8b77e
Move _dlpack.pyx/pxd to dpctl_ext.tensor
vlad-perevezentsev 5c9e183
Move _flags.pyx to dpctl_ext.tensor
vlad-perevezentsev 8f44c37
Move cython helper files
vlad-perevezentsev e2441eb
Move dldevice_conversions functions
vlad-perevezentsev 422e87e
Move usm_ndarray to dpctl_ext.tensor
vlad-perevezentsev 75580a5
fix clang-format
ndgrigorian e114808
Fix import _flags and _dlpack in _usmarray.pyx
vlad-perevezentsev 39c0571
Update CMakes files to build usm_ndarray
vlad-perevezentsev 7e6a283
abbreviate namespaces in linalg module sources and headers
ndgrigorian 3c428a6
Switch fully to dpctl_ext.tensor in dpctl_ext.tensor
vlad-perevezentsev 3883a1c
Switch fully to dpctl_ext.tensor in dpnp
vlad-perevezentsev 23164ac
Reorder _usmarray import in __init__.py
vlad-perevezentsev 18c3d61
Add missing _place_impl() to _copy_utils.py
vlad-perevezentsev 7f14dfc
Update _dlpack.pyx to use dpctl_ext.tensor
vlad-perevezentsev 5e7123d
Update _usmarray.pyx to use dpctl_ext.tensor
vlad-perevezentsev f4da0de
Integrate dpctl_ext.tensor C-API to dpnp4pybind11.hpp
vlad-perevezentsev 1e4902d
Add from_dlpack to API dpctl_ext.tensor
vlad-perevezentsev 9a50f9f
Extend .gitignore for dpctl_ext/include
vlad-perevezentsev 153a91b
Add DpctlExtCAPI interface target
vlad-perevezentsev 95acc3d
Increase build time for public CI
vlad-perevezentsev f55507d
Update test_from_dlpack_with_dpt to use dpt.empty
vlad-perevezentsev 5d11ff7
Merge include-dpctl-tensor into move_tensor_elementwise_impl_unary
vlad-perevezentsev 281adbf
Apply remarks
vlad-perevezentsev 7b63ab5
Merge move_tensor_elementwise_impl_unary into move_tensor_elementwise…
vlad-perevezentsev a2d28af
Clean-up includes
vlad-perevezentsev 1403be4
Merge move_tensor_elementwise_impl_unary_par_2 into move_tensor_eleme…
vlad-perevezentsev 0182c74
Clean-up includes
vlad-perevezentsev 86878cf
Merge move_tensor_elementwise_impl_unary_par_3 into move-tensor-linalg
vlad-perevezentsev c0ff29f
Add the missing includes for dot.cpp
vlad-perevezentsev ca295f1
Merge move-tensor-linalg into move_elementwise_binary_impl
vlad-perevezentsev e6e179e
Clean-up includes
vlad-perevezentsev ed289fc
Merge move_elementwise_binary_impl into move_elementwise_binary_impl_…
vlad-perevezentsev a3b2d00
Clean-up includes
vlad-perevezentsev d4ca39b
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev b467db5
Clean-up includes
vlad-perevezentsev 608802a
Clean-up includes
vlad-perevezentsev b614202
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev f4c05d2
Merge move_elementwise_binary_impl_part_3 into finalize_functional_mi…
vlad-perevezentsev 9a7fae9
Merge finalize_functional_migration into move_usm_ndarray
vlad-perevezentsev 3ba741a
Add public C-API header for dpctl_ext
vlad-perevezentsev 946ce93
Move dpctl C-API imports to dpctl_ext_capi.h
vlad-perevezentsev da0995c
Remove the workaround via CMAKE_BINARY_DIR from DpctlExtCAPI
vlad-perevezentsev 31685d4
Disable pylint check no-name-in-module in dpnp_iface_statistics.py
vlad-perevezentsev fddedde
Merge include-dpctl-tensor into move_elementwise_binary_impl_part_2
vlad-perevezentsev 969ec9a
Add a missing include
vlad-perevezentsev b0a4a6e
Apply remarks
vlad-perevezentsev 21f1aec
Merge move_elementwise_binary_impl_part_2 into move_elementwise_binar…
vlad-perevezentsev 255a20b
Merge include-dpctl-tensor into move_elementwise_binary_impl_part_3
vlad-perevezentsev d00ebe4
Clean up includes
vlad-perevezentsev 1a4f450
Merge move_elementwise_binary_impl_part_3 into finalize_functional_mi…
vlad-perevezentsev ed51252
Merge finalize_functional_migration into move_usm_ndarray
vlad-perevezentsev b4395ea
Increase timeout_minutes for build dpnp with coverage step
vlad-perevezentsev 7327502
Increase timeout-minutes for Build and Deploy Docs
vlad-perevezentsev 42a6ada
Merge include-dpctl-tensor into finalize_functional_migration
vlad-perevezentsev bc52234
Update test_from_dlpack_with_dpt to use empty from dpctl_ext
vlad-perevezentsev 8adaa68
Fully switch to using dpctl_ext functions for dpnp_elementwise_common.py
vlad-perevezentsev 0277672
Update _testing.py in dpctl_ext/tensor
vlad-perevezentsev 11562a2
Merge finalize_functional_migration into move_usm_ndarray
vlad-perevezentsev fd763f3
Merge include-dpctl-tensor into move_usm_ndarray
vlad-perevezentsev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 * |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
PyUSMArrayObjectfornumba-dpex's sake. So this way,usm_ndarraywould 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_GetDatacould also be removed (barring causing any problems in thedpctl_ext).