-
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
Decouple pybind11 and kernels #1516
Conversation
This change affected linspace, arange, and full constructors. This change causes no user visible changes.
Removed uses of `#include <pybind11/pybind11.h>` from header files in libtensor/include/kernels folder Replaced `#include <CL/sycl.hpp>` with `#include <sycl/sycl.hpp>`. Introduced "kernels/dpctl_tensor_types.hpp" which defines the type, and included it in header files. Added static_assert in some CPP files to ensure that `py::ssize_t` is the same as `dpctl::tensor::ssize_t`.
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_51 ran successfully. |
@oleksandr-pavlyk |
I deliberately left Files in the kernel subfolder do not, so I think we should leave |
Since utils headers are used in kernels, to make kernels/ independent of pybind11, it is necessary to ensure that all depedent header files also do not include pybind11. Changed offset_utils to use dpctl::tensor::ssize_t instead of py::ssize_t. Factored out pybind11 independent components of type_dispatch.hpp header into type_dispatch_building.hpp . What remains uses dpctl4pybind11 and hence genuinely depends on pybind11.
Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_52 ran successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for tackling this @oleksandr-pavlyk !
Moved all uses of pybind11 types and functions out of
libtensor/include/kernels
.py::object
and casters were moved to respective*.cpp
files.dpctl::tensor::ssize_t
was definedpy::ssize_t
in function signatures replaced with of library'sssize_t
type#include "pybind11/pybind11.h"
removed (speeding up compilation time)static_assert(std::is_same_v(py::ssize_t, dpctl::tensor:;ssize_t>)
in aome*.cpp
files#include <CL/sycl.hpp>
has been replaced with#include <sycl/sycl.hpp>
.