{{ message }}
Specialize copy_from_numpy_into_usm_ndarray for contig case#1829
Merged
oleksandr-pavlyk merged 5 commits intoSep 12, 2024
Conversation
for contiguous case. Tensor implementation module temporarily exports both _copy_numpy_into_usm_ndarray_legacy, and _copy_numpy_into_usm_ndarray functions to performance comparison.
e043932 to
1869f06
Compare
|
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_9 ran successfully. |
Collaborator
|
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_9 ran successfully. |
…ernel Used unitrace to verify that the contiguous kernel is exercised in both direct call to asarray (for C-contiguous numpy array) with type casting, and when assigning to usm-ndarray from numpy of different data type when both arrays are dense, but strides may be negative.
|
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_24 ran successfully. |
|
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_25 ran successfully. |
ndgrigorian
reviewed
Sep 12, 2024
Collaborator
|
@oleksandr-pavlyk |
ndgrigorian
approved these changes
Sep 12, 2024
ndgrigorian
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, this is a nice improvement, thank you @oleksandr-pavlyk
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Specialize
_copy_from_numpy_into_usm_ndarrayfor contiguous case.Tensor implementation module temporarily exports both
_copy_numpy_into_usm_ndarray_legacy, and_copy_numpy_into_usm_ndarrayfunctions to performance comparison.The specialization reuses the same kernel, instantiated with
NoOpIndexer, reducing the number of kernel arguments.It also eliminates small allocation of USM temporaries needed to pass shape/strides information to the general kernel, and the cost of copying from host to these temporary allocations.