-
Notifications
You must be signed in to change notification settings - Fork 30
Feature/build with scikit build and cmake #746
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
Feature/build with scikit build and cmake #746
Conversation
db6839d
to
dca2ed4
Compare
4ec8382
to
f80e4d9
Compare
View rendered docs @ https://intelpython.github.io/dpctl/pulls/746/index.html |
57b47f1
to
baa09b2
Compare
I am going to defer writing |
@oleksandr-pavlyk Thanks for the much needed changes. Can you please update the PR description with a list of changes that were done in the PR? Also, please review the commits to see if any need squashing (such as any WIP commits). Overall, let us merge the and move forth asap. |
Is the |
The change to _dlpack was to fix incorrect path to includes (relative to current dir).
Modified CMakeLists.txt to add needed include directories for the dpctl_c_api_tests target
This is needed so that the test checking for captured cerr stream does not fail. Removed dpcpp_kernels.cpp file (dpcpp linker fails on it) Used -fno-sycl-use-footer to work-around a bug getting in a way of collecting profiling data
…older Delete DPCTLSyclInterface library shared objects from dpctl/ folder from previous runs. Monkey-patch skbuild.setuptools._copy_file to not follows symbolic links, to ensure that versioned DPCTLSyclInterface ends up as the proper set of symbolic links pointing to a single physical shared object file. If symbolic links are followed, 3 identical copies of the library end up in the installation folder. Downstream dpctl users may end up with several instances of the library in their process space which may end up with errors is statuful functinality (queue manager) is used.
Two reasons to do this: 1. to allow for providing hint env variables to help cmake find `SYCL_INCLUDE_DIR` and `SYCL_LIBRARY_DIR` for custom layouts of DPC++ installed into Python environment with conda 2. To allow use of nightly sycl bundles to build dpctl (bundle does not include IntelDPCPPConig.cmake)
Two variants are provided: "docs" and "coverage".
Usage: ``` python scripts/gen_coverage.py ``` Builds coverage binaries, runs both ctests and pytest Allowed options can be retrived with `python scripts/gen_coverage.py --help`. Only Linux is supported, dependencies are assumed to be available.
Usage: ``` python scripts/build_sycl_nightly.py --c-compiler=$(which clang) --cxx-compiler=$(which clang++) --compiler-root=$(dirname $(dirname $(which clang))) ``` Option `--cmake-executable` can be used to use newer cmake
7a2467c
to
c7529c6
Compare
One can probably do away with it, but that is additional work which belongs to a separate PR. More likely we need to streamline it to reuse what is computed in |
I have rebased and squashed several commits. Ready for rereview. |
Removed scripts/build_for_develop* as obsolete. Renamed scripts/build_sycl_nightly.py as scripts/build_locally.py Updated quick start guide to account for the renaming.
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Closes #747
Closes #743
This is PR transition
dpctl
to use scikit-build project to control building both libsyclinterface and python extensions via CMake. Minimum required Cmake version is 3.21 to supportfind_package(IntelDPCPP REQUIRED)
.DPC++ is now being used to build both the library and the Python API compoenents.
To build in develop, use
python setup.py develop -- -G "Unix Makefiles" -- -DCMAKE_CXX_COMPILER:PATH=icpx -DDPCTL_ENABLE_LO_PROGRAM_CREATION=ON
Alternatively one can use driver scripts:
Previous syntax of using
--sycl-compiler-prefix
will no longer work.