Move usm_ndarray into dpctl_ext.tensor#2807
Move usm_ndarray into dpctl_ext.tensor#2807vlad-perevezentsev wants to merge 264 commits intoinclude-dpctl-tensorfrom
usm_ndarray into dpctl_ext.tensor#2807Conversation
| @@ -64,7 +64,7 @@ | |||
| # Borrowed from DPCTL | |||
| with warnings.catch_warnings(): | |||
| warnings.simplefilter("ignore", DeprecationWarning) | |||
There was a problem hiding this comment.
I guess we have to remove the warning suppress, since it's the last PR removing migration of the source code
|
@antonwolfy @vlad-perevezentsev Maybe could we flatten to something like |
|
|
Based on warning report seems we still using |
| pybind11_add_module(${python_module_name} MODULE ${_module_src}) | ||
| add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_module_src}) | ||
|
|
||
| target_link_libraries(${python_module_name} PRIVATE DpctlExtCAPI) |
There was a problem hiding this comment.
Why do we need that and how it worked previously without linking with dpctl lib?
There was a problem hiding this comment.
Previously dpnp4pybind11.hpp included dpctl_capi.h from the external dpctl package which was found via ${Dpctl_INCLUDE_DIRS} set by find_package(Dpctl).
Now dpnp4pybind11.hpp includes dpctl_ext_capi.h which is an internal header,and without linking to DpctlExtCAPI I got an error
dpnp4pybind11.hpp:41:10: fatal error: 'dpctl_ext_capi.h' file not found
41 | #include "dpctl_ext_capi.h"
There was a problem hiding this comment.
But the error is about include, not about linkage.
| endif() | ||
|
|
||
| add_subdirectory(dpnp) | ||
| # DpctlExtCAPI: Interface library for dpctl_ext C-API |
There was a problem hiding this comment.
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.
It's a design decision either way: dpctl exposed PyUSMArrayObject for numba-dpex's sake. So this way, usm_ndarray would 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_GetData could also be removed (barring causing any problems in the dpctl_ext).
This PR proposes to migrate the tensor interface (
usm_ndarray, dlpack, flags) intodpctl_ext/tensormakingdpnpindependent ofdpctl'stensor module.Updates: