Fix gh 1038 empty zero check device aspects#1042
Merged
oleksandr-pavlyk merged 5 commits intomasterfrom Jan 26, 2023
Merged
Conversation
Both functions will now raise ValueError is data type not natively supported by device is requested.
The default data type can hence raise.
Where dtype is irrelavant use data types mandated by SYCL standard, otherwise check if dtype can be used before making the call.
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/1042/index.html |
Collaborator
|
Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_31 ran successfully. |
… supported by device
|
Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_35 ran successfully. |
npolina4
approved these changes
Jan 24, 2023
|
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
|
Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_43 ran successfully. |
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.
Closes gh-1038.
Added checks to
dpctl.tensor.emptyanddpctl.tensor.zerosto disallow creation of arrays with data-types not natively supported by the requested device.Also added check to
dpctl.tensor.usm_ndarrayconstructor to raise the error if an attempt to create an instance requests data type not natively supported by the device.