You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created dpctl::detail::dpctl_capi class to import_dpctl()
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.
0 commit comments