Merged
Conversation
This is to avoid multiple definitions compilation error when using multiple translation units.
…efinition of' compilation error messages
Moved implementation of kernels out to dedicated header files.
Use -O1 when compiling tensor_py for now to work around suspected issue with loading of C-API functions.
…es`. The class is already singleton. Instead create a local variable at each use site. This local variable is going to be a constant reference to the singleton.
[cleanup/tensor, part 2] Modularized tests for contiguity, retrieval of PyUSMArrayObject* and removed use of a global variable.
The class implements a singleton pattern that populates global variables exported by Cython CAPI functions via call to import_dpctl() and then populates internal struct members with pointers populated by Cython. This loads both Cython 'public api' functions, types, and integer values. dpctl::tensor::usm_ndarray and dpctl::memory::usm_memory classes, as well as type-casters for dpctl.SyclQueue <-> sycl::queue, dpctl.SyclDevice <-> sycl::device, etc. use dpctl_capi. The singleton patterns helps avoid static initialization order fiasco problem when using multiple translation units. Single dpctl_capi loads typenum values, the dpctl::tensor::detail::usm_ndarray_types struct no longer needs to be a singleton, and becomes an ordinary struct with a static method. tensor_py.cpp was changed to reflect that.
[cleanup/tensor, step 3] Implement dpctl_capi loader in dpctl4pybind11 header file
This is avoid using py::value_error and py::ssize_t and py::type_error in there explicitly. Use in tensor_py.cpp adjusted
[cleanup/tensor, part 4] Made contract_iter and contract_iter2 functions templated to avoid needing to include pybind11 headers
…ed file Also moved routine for simplification of iteration space into dedicated file
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/941/index.html |
Collaborator
|
Array API standard conformance tests for dpctl=0.14.0dev0=py310h8c27c75_192 ran successfully. |
Contributor
Author
|
This individual merges were reviewed, and CI is green, merging. |
|
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
|
Array API standard conformance tests for dpctl=0.14.0dev0=py310h8c27c75_192 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.
This PR is the composition of #925 #931 #932 #933 #934
This PR supersedes #923.