From 7eff62ef53fc11c3d82ae348eae8ae91a5323a47 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 12 May 2022 20:16:15 -0700 Subject: [PATCH 1/7] Fixed build_locally.py to allow building debug build --- scripts/build_locally.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/build_locally.py b/scripts/build_locally.py index 0486fe53a9..2f5098044f 100644 --- a/scripts/build_locally.py +++ b/scripts/build_locally.py @@ -49,10 +49,9 @@ def run( "--cmake-executable=" + cmake_executable, ] cmake_args += [ + "--build-type=" + build_type, + "--generator=" + build_system, "--", - "-G", - build_system, - "-DCMAKE_BUILD_TYPE=" + build_type, "-DCMAKE_C_COMPILER:PATH=" + c_compiler, "-DCMAKE_CXX_COMPILER:PATH=" + cxx_compiler, "-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"), From 3af54d8d21be4ea447cb4bf504188fa88e010cf1 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 May 2022 09:47:06 -0500 Subject: [PATCH 2/7] Fixed gen_coverage.py to build debug build --- scripts/gen_coverage.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/gen_coverage.py b/scripts/gen_coverage.py index 0e79d565c9..58eea04ecc 100644 --- a/scripts/gen_coverage.py +++ b/scripts/gen_coverage.py @@ -47,10 +47,9 @@ def run( sys.executable, "setup.py", "develop", + "--build-type=Debug", + "--generator=Ninja", "--", - "-G", - "Ninja", - "-DCMAKE_BUILD_TYPE=Debug", "-DCMAKE_C_COMPILER:PATH=" + c_compiler, "-DCMAKE_CXX_COMPILER:PATH=" + cxx_compiler, "-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"), From 3dbe4777ce6bdd47049dc5a4f71a7057970aa530 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 May 2022 09:47:26 -0500 Subject: [PATCH 3/7] Fixed gen_docs.py to build debug build --- scripts/gen_docs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/gen_docs.py b/scripts/gen_docs.py index d833ad0b31..ab1daf51f7 100644 --- a/scripts/gen_docs.py +++ b/scripts/gen_docs.py @@ -46,10 +46,9 @@ def run( sys.executable, "setup.py", "develop", + "--build-type=Debug", + "--generator=Ninja", "--", - "-G", - "Ninja", - "-DCMAKE_BUILD_TYPE=Debug", "-DCMAKE_C_COMPILER:PATH=" + c_compiler, "-DCMAKE_CXX_COMPILER:PATH=" + cxx_compiler, "-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"), From 322b64d9ba3a7f16428915b88ef81969a4001fec Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 May 2022 09:57:48 -0500 Subject: [PATCH 4/7] Fixed python setup.py invocation to pass generator to scikit-build rather than cmake directly --- .github/workflows/conda-package.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index ce0f3c36d3..eb3f253945 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -398,8 +398,7 @@ jobs: conda activate --stack build_env if [ -e CMakeLists.txt ] then - python setup.py build_ext --inplace -- -G Ninja \ - -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx \ + CC=icx CXX=icpx python setup.py build_ext --inplace -G Ninja -- \ -DTBB_LIBRARY_DIR=${TBBROOT}/lib \ -DMKL_LIBRARY_DIR=${MKLROOT}/lib \ -DMKL_INCLUDE_DIR=${MKLROOT}/include \ From 3543c5ce78aae63759d1924a68467946a153f9c7 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 May 2022 09:58:25 -0500 Subject: [PATCH 5/7] Fixed generate-docs workflows to pass generatro and build type to scikit-build --- .github/workflows/generate-docs.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml index 63b3942033..6452f886de 100644 --- a/.github/workflows/generate-docs.yml +++ b/.github/workflows/generate-docs.yml @@ -63,13 +63,12 @@ jobs: source /opt/intel/oneapi/setvars.sh wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.2/doxyrest-2.1.2-linux-amd64.tar.xz tar xf doxyrest-2.1.2-linux-amd64.tar.xz - python setup.py develop -- \ - -G "Ninja" \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_C_COMPILER:PATH=icx \ - -DCMAKE_CXX_COMPILER:PATH=icpx \ - -DDPCTL_GENERATE_DOCS=ON \ - -DDPCTL_ENABLE_DOXYREST=ON \ + python setup.py develop -G Ninja --build-type=Debug \ + -- \ + -DCMAKE_C_COMPILER:PATH=$(which icx) \ + -DCMAKE_CXX_COMPILER:PATH=$(which icpx) \ + -DDPCTL_GENERATE_DOCS=ON \ + -DDPCTL_ENABLE_DOXYREST=ON \ -DDoxyrest_DIR=`pwd`/doxyrest-2.1.2-linux-amd64 python -c "import dpctl; print(dpctl.__version__)" || exit 1 cd "$(find _skbuild -name cmake-build)" || exit 1 From 0634194e9faa55c957088cd90cdd8d613a1b0797 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 May 2022 09:59:16 -0500 Subject: [PATCH 6/7] Simplifed python setup.py call in os-llvm-sycl-build workflow --- .github/workflows/os-llvm-sycl-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 6f84bb1004..adedc446f7 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -97,6 +97,6 @@ jobs: export OCL_ICD_FILENAMES=libintelocl.so:libintelocl_emu.so clang++ --version sycl-ls - python setup.py develop -- -G Ninja -DCMAKE_C_COMPILER:PATH=clang -DCMAKE_CXX_COMPILER:PATH=clang++ + CC=clang CXX=clang++ python setup.py develop -G Ninja python -c "import dpctl; dpctl.lsplatform()" || exit 1 SYCL_ENABLE_HOST_DEVICE=1 python -m pytest -v dpctl/tests From 4a92dbaadc03ff2838fc99e69bf9a3ed14c9dfd8 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 May 2022 09:59:49 -0500 Subject: [PATCH 7/7] Pass generator to scikit-build rather than cmake directly --- conda-recipe/bld.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index 9cf6c78466..c4071c86c6 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -4,7 +4,7 @@ set "LIB=%BUILD_PREFIX%\Library\lib;%BUILD_PREFIX%\compiler\lib;%LIB%" set "INCLUDE=%BUILD_PREFIX%\include;%INCLUDE%" "%PYTHON%" setup.py clean --all -set "SKBUILD_ARGS=-- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx" +set "SKBUILD_ARGS=-G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx" set "SYCL_INCLUDE_DIR_HINT=%BUILD_PREFIX%\Library\lib\clang\14.0.0" set "PLATFORM_DIR=%PREFIX%\Library\share\cmake-3.22\Modules\Platform"