-
Notifications
You must be signed in to change notification settings - Fork 30
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
Implements dpctl.tensor._flags #921
Conversation
View rendered docs @ https://intelpython.github.io/dpctl/pulls/921/index.html |
719e117
to
9d1e830
Compare
Can you please either merge main branch into this PR, or rebase it on top of the main branch to fix the CI? |
9d1e830
to
d9c0d08
Compare
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_142. |
@ndgrigorian The linter failed. Is pre-commit passing in your local workflow? |
Yes, but it skips flake8. When I run flake8 on _flags.pyx, it thinks cimport is a syntax error. _dlpack.pxd fails flake8 runs for the same reason, but pre-commit passes it as well, because it skips flake8. |
@ndgrigorian Please add the following entry for the
@oleksandr-pavlyk We need to document how to handle flake8 related config for pyx files it in the CONTRIBUTING document. |
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_151. |
3dec850
to
215ef2f
Compare
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_151. |
I have made changes warranting the use of Cython:
Also modified the test file to leverate |
@ndgrigorian Please look over the changes and merge. |
I've committed a small change: Numpy's FNC flag is F-contiguous-and-not C-contiguous, so I moved the previous implementation of fnc to a new property, fc, and changed fnc to match Numpy's. I also adjusted the tests to reflect that. |
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_152. |
… __eq__ Support for `__eq__` allows to compare two instances of Flags objects and compare Flags object to an integer.
Added tests to covert methods of Flags class
60b7a93
to
74043c3
Compare
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_157. |
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_156. |
Given my confusion of the meaning of |
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_156. |
Reworks usm_ndarray.flags to return a dpctl.tensor._flags object, which streamlines checking flags, such as array memory order and if it's writable.
e.g., for an array X, X.flags now prints the truth values of the currently implemented flags: C-contiguous, F-contiguous, and Writable, while X.flags.forc returns True if one of C-contiguous and F-contiguous is true, and False otherwise.
Note: this will fail the flake8 style guide check as flake8 does not recognize 'cimport' in _flags.pyx as valid syntax.