From 93bc422de7652fd2973c9df7e68b69eda90f9bbe Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 14 Nov 2024 09:17:48 -0800 Subject: [PATCH 01/14] Add DPCTL_WITH_REDIST:BOOL=OFF option to cmake script --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14cc1e3ab8..3770a02d31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ option(DPCTL_TARGET_CUDA "Build DPCTL to target CUDA devices" OFF ) +option(DPCTL_WITH_REDIST "Build DPCTL assuming DPC++ redistributable is installed into Python prefix" OFF) find_package(IntelSYCL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/cmake NO_DEFAULT_PATH) From e960e699fec06c446d0f028357ab20b911d4b2bf Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 14 Nov 2024 09:18:50 -0800 Subject: [PATCH 02/14] Add sycl8.lib to the list of valid libraries to look for --- libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake b/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake index faa1d7df51..202b1223a2 100644 --- a/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake +++ b/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake @@ -119,7 +119,7 @@ if(${clangxx_result} MATCHES "0") if("x${CMAKE_SYSTEM_NAME}" STREQUAL "xWindows") find_file( IntelSyclCompiler_SYCL_LIBRARY - NAMES "sycl.lib" "sycl6.lib" "sycl7.lib" + NAMES "sycl.lib" "sycl6.lib" "sycl7.lib" "sycl8.lib" PATHS ${IntelSyclCompiler_LIBRARY_DIR} ) find_file( From a14f900a3c389d48be39adc07d798452b216bea5 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 14 Nov 2024 09:19:21 -0800 Subject: [PATCH 03/14] Support DPCTL_WITH_REDIST for DPCTLSyclInterface target --- libsyclinterface/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libsyclinterface/CMakeLists.txt b/libsyclinterface/CMakeLists.txt index 71c5c80656..56dfc24391 100644 --- a/libsyclinterface/CMakeLists.txt +++ b/libsyclinterface/CMakeLists.txt @@ -314,6 +314,11 @@ target_include_directories(DPCTLSyclInterfaceHeaders INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include ) +if (DPCTL_WITH_REDIST) + cmake_path(RELATIVE_PATH CMAKE_SOURCE_DIR BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE _relative_path) + set_target_properties(DPCTLSyclInterface PROPERTIES INSTALL_RPATH "$ORIGIN/${_relative_path}/../../") +endif() + install(TARGETS DPCTLSyclInterface LIBRARY From 521016c8f1b1db5818a170aa624a32e7ea4a87cb Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 14 Nov 2024 09:19:51 -0800 Subject: [PATCH 04/14] Support DPCTL_WITH_REDIST for Cython extensions --- dpctl/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dpctl/CMakeLists.txt b/dpctl/CMakeLists.txt index d481f0fb41..3384d41a1c 100644 --- a/dpctl/CMakeLists.txt +++ b/dpctl/CMakeLists.txt @@ -146,6 +146,14 @@ function(build_dpctl_ext _trgt _src _dest) get_filename_component(_generated_src_dir_dir ${_generated_src_dir} DIRECTORY) # TODO: do not set directory if we did not generate header target_include_directories(${_trgt} INTERFACE ${_generated_src_dir_dir}) + set(_rpath_value "$ORIGIN") + if (DPCTL_WITH_REDIST) + get_filename_component(_src_dir ${_src} DIRECTORY) + cmake_path(RELATIVE_PATH CMAKE_SOURCE_DIR BASE_DIRECTORY ${_src_dir} OUTPUT_VARIABLE _relative_path) + string(JOIN ":" _expanded_rpath_value ${_rpath_value} "$ORIGIN/${_relative_path}/../../") + set(_rpath_value ${_expanded_rpath_value}) + endif() + set_target_properties(${_trgt} PROPERTIES INSTALL_RPATH ${_rpath_value}) install(TARGETS ${_trgt} LIBRARY DESTINATION ${_dest}) From 83fd6e2acd8a6f761f5c43bceeb323420154c433 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 14 Nov 2024 09:20:22 -0800 Subject: [PATCH 05/14] Support DPCTL_WITH_REDIST for pybind11 modules in dpctl/utils Deduplicated common steps among two pybind11 extensions in this dpctl.utils Fixed typo CUMAKE_CURRENT_SOURCE_DIR -> CMAKE_CURRENT_SOURCE_DIR --- dpctl/utils/CMakeLists.txt | 98 +++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/dpctl/utils/CMakeLists.txt b/dpctl/utils/CMakeLists.txt index 2a8494032a..9ee799aeee 100644 --- a/dpctl/utils/CMakeLists.txt +++ b/dpctl/utils/CMakeLists.txt @@ -5,37 +5,15 @@ foreach(_cy_file ${_cython_sources}) build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/utils") endforeach() +set(_pybind11_targets) + set(python_module_name _device_queries) set(_module_src ${CMAKE_CURRENT_SOURCE_DIR}/src/device_queries.cpp) pybind11_add_module(${python_module_name} MODULE ${_module_src} ) add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_module_src}) -if(DPCTL_GENERATE_COVERAGE) - if(DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS) - target_compile_options(${python_module_name} - PRIVATE -fprofile-instr-generate -fcoverage-mapping - ) - endif() - target_link_options(${python_module_name} - PRIVATE -fprofile-instr-generate -fcoverage-mapping - ) -endif() -if(_dpctl_sycl_targets) - # make fat binary - target_compile_options( - ${python_module_name} - PRIVATE - -fsycl-targets=${_dpctl_sycl_targets} - ) - target_link_options( - ${python_module_name} - PRIVATE - -fsycl-targets=${_dpctl_sycl_targets} - ) -endif() -target_link_libraries(${python_module_name} PRIVATE DpctlCAPI) -install(TARGETS ${python_module_name} DESTINATION "dpctl/utils") +list(APPEND _pybind11_targets ${python_module_name}) set(python_module_name _seq_order_keeper) @@ -43,30 +21,52 @@ set(_module_src ${CMAKE_CURRENT_SOURCE_DIR}/src/order_keeper.cpp) pybind11_add_module(${python_module_name} MODULE ${_module_src} ) -target_include_directories(${python_module_name} PRIVATE ${CUMAKE_CURRENT_SOURCE_DIR}/src) +target_include_directories(${python_module_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_module_src}) -if(DPCTL_GENERATE_COVERAGE) - if(DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS) - target_compile_options(${python_module_name} - PRIVATE -fprofile-instr-generate -fcoverage-mapping - ) - endif() - target_link_options(${python_module_name} - PRIVATE -fprofile-instr-generate -fcoverage-mapping - ) -endif() -if(_dpctl_sycl_targets) - # make fat binary - target_compile_options( - ${python_module_name} - PRIVATE - -fsycl-targets=${_dpctl_sycl_targets} - ) - target_link_options( - ${python_module_name} +list(APPEND _pybind11_targets ${python_module_name}) + +set(_linker_options "LINKER:${DPCTL_LDFLAGS}") +foreach(python_module_name ${_pybind11_targets}) + target_compile_options(${python_module_name} PRIVATE -fno-sycl-id-queries-fit-in-int) + target_link_options(${python_module_name} PRIVATE -fsycl-device-code-split=per_kernel) + target_include_directories(${python_module_name} PRIVATE - -fsycl-targets=${_dpctl_sycl_targets} + ${CMAKE_CURRENT_SOURCE_DIR}/libtensor/include + ${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/ ) -endif() -target_link_libraries(${python_module_name} PRIVATE DpctlCAPI) -install(TARGETS ${python_module_name} DESTINATION "dpctl/utils") + target_link_options(${python_module_name} PRIVATE ${_linker_options}) + if(DPCTL_GENERATE_COVERAGE) + if(DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS) + target_compile_options(${python_module_name} + PRIVATE -fprofile-instr-generate -fcoverage-mapping + ) + endif() + target_link_options(${python_module_name} + PRIVATE -fprofile-instr-generate -fcoverage-mapping + ) + endif() + if(_dpctl_sycl_targets) + # make fat binary + target_compile_options( + ${python_module_name} + PRIVATE + -fsycl-targets=${_dpctl_sycl_targets} + ) + target_link_options( + ${python_module_name} + PRIVATE + -fsycl-targets=${_dpctl_sycl_targets} + ) + endif() + # TODO: update source so they refernece individual libraries instead of + # dpctl4pybind11.hpp. It will allow to simplify dependency tree + target_link_libraries(${python_module_name} PRIVATE DpctlCAPI) + if (DPCTL_WITH_REDIST) + set_target_properties( + ${python_module_name} + PROPERTIES + INSTALL_RPATH "$ORIGIN/../../../.." + ) + endif() + install(TARGETS ${python_module_name} DESTINATION "dpctl/utils") +endforeach() From cfdca270851789db0f5a855fa59f5159a8eb03fb Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 14 Nov 2024 09:22:14 -0800 Subject: [PATCH 06/14] Support DCPTL_WITH_REDIST for pybind11 extensions in dpctl.tensor --- dpctl/tensor/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dpctl/tensor/CMakeLists.txt b/dpctl/tensor/CMakeLists.txt index 65b96d981e..407aa624fd 100644 --- a/dpctl/tensor/CMakeLists.txt +++ b/dpctl/tensor/CMakeLists.txt @@ -284,5 +284,12 @@ foreach(python_module_name ${_py_trgts}) # TODO: update source so they refernece individual libraries instead of # dpctl4pybind11.hpp. It will allow to simplify dependency tree target_link_libraries(${python_module_name} PRIVATE DpctlCAPI) + if (DPCTL_WITH_REDIST) + set_target_properties( + ${python_module_name} + PROPERTIES + INSTALL_RPATH "$ORIGIN/../../../.." + ) + endif() install(TARGETS ${python_module_name} DESTINATION "dpctl/tensor") endforeach() From 2094a2beccd5decf9ea600abf467f0bf9eaa017f Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 14 Nov 2024 09:22:45 -0800 Subject: [PATCH 07/14] Set DPCTL_WITH_REDIST=TRUE in conda build script --- conda-recipe/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index dec613d814..8985c698a4 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -22,7 +22,7 @@ export CMAKE_GENERATOR=Ninja # Make CMake verbose export VERBOSE=1 -CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level_zero" +CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level_zero -DCMAKE_WITH_REDIST=ON" # -wnx flags mean: --wheel --no-isolation --skip-dependency-check ${PYTHON} -m build -w -n -x From 745508d5ffde67eb625df5bad8bc8a268bac8b3c Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Nov 2024 08:09:39 -0800 Subject: [PATCH 08/14] Updated values to look for when setting SYCL_INCLUDE_DIR_HINT env varible --- 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 84403b6d3f..8cb076af5c 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -10,7 +10,7 @@ if DEFINED OVERRIDE_INTEL_IPO ( set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE" ) -FOR %%V IN (14.0.0 14 15.0.0 15 16.0.0 16 17.0.0 17) DO @( +FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19) DO @( REM set DIR_HINT if directory exists IF EXIST "%BUILD_PREFIX%\Library\lib\clang\%%V\" ( SET "SYCL_INCLUDE_DIR_HINT=%BUILD_PREFIX%\Library\lib\clang\%%V" From d924dcdc339ed34e3a405758a9cbc5b111725195 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Nov 2024 08:11:49 -0800 Subject: [PATCH 09/14] Remove leftover code from when dpctl has post-link and pre-unlink scripts --- conda-recipe/build.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 8985c698a4..3b916b1ced 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -43,7 +43,3 @@ ${PYTHON} -m pip install dist/dpctl*.whl \ if [[ -d "${WHEELS_OUTPUT_FOLDER}" ]]; then cp dist/dpctl*.whl "${WHEELS_OUTPUT_FOLDER[@]}" fi - -# need to create this folder so ensure that .dpctl-post-link.sh can work correctly -mkdir -p $PREFIX/etc/OpenCL/vendors -echo "dpctl creates symbolic link to system installed /etc/OpenCL/vendors/intel.icd as a work-around." > $PREFIX/etc/OpenCL/vendors/.dpctl_readme From 1f715138d7bc69720f3e70303ebed5b6dab0e293 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Nov 2024 11:44:46 -0800 Subject: [PATCH 10/14] Replace setting LD_LIBRARY_PATH with setting LIBRARY_PATH based on the preceding comment --- conda-recipe/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 3b916b1ced..ae780b188f 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # This is necessary to help DPC++ find Intel libraries such as SVML, IRNG, etc in build prefix -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${BUILD_PREFIX}/lib" +export LIBRARY_PATH="$LD_LIBRARY_PATH:${BUILD_PREFIX}/lib" # Intel LLVM must cooperate with compiler and sysroot from conda echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg From 708b9b052fe7c2b5fa075d9b185b657f70d4cea2 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Nov 2024 11:47:16 -0800 Subject: [PATCH 11/14] Correct typo: CMAKE_WITH_REDIST->DPCTL_WITH_REDIST --- conda-recipe/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index ae780b188f..604723d983 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -22,7 +22,7 @@ export CMAKE_GENERATOR=Ninja # Make CMake verbose export VERBOSE=1 -CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level_zero -DCMAKE_WITH_REDIST=ON" +CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level_zero -DDPCTL_WITH_REDIST=ON" # -wnx flags mean: --wheel --no-isolation --skip-dependency-check ${PYTHON} -m build -w -n -x From 3bc2e9d59608ee40fe3c35ec10ddb6bffc2be431 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Nov 2024 11:47:55 -0800 Subject: [PATCH 12/14] Based on conda build verify messages, replace dpcpp-cpp-rt with intel-sycl-rt --- conda-recipe/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index f422f6f563..e58ae9ad65 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -29,7 +29,8 @@ requirements: - pip >=24.0 - level-zero-devel >=1.16 - pybind11 >=2.12 - - {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }} + - {{ pin_compatible('intel-sycl-rt', min_pin='x.x', max_pin='x') }} + - {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }} # Ensure we are using latest version of setuptools, since we don't need # editable environments for release. - setuptools >=69 @@ -51,7 +52,7 @@ requirements: - tomli # [py<311] run: - python - - {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }} + - {{ pin_compatible('intel-sycl-rt', min_pin='x.x', max_pin='x') }} - {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }} - numpy From 65360c3c01c04731b535a0d0f1401cb1461e2054 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Nov 2024 12:26:12 -0800 Subject: [PATCH 13/14] Set RELATIVE_PATH argument to build_dpctl_ext for pertinent modules --- dpctl/CMakeLists.txt | 10 +++++----- dpctl/memory/CMakeLists.txt | 2 +- dpctl/program/CMakeLists.txt | 2 +- dpctl/tensor/CMakeLists.txt | 2 +- dpctl/utils/CMakeLists.txt | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dpctl/CMakeLists.txt b/dpctl/CMakeLists.txt index 3384d41a1c..921a4fbf86 100644 --- a/dpctl/CMakeLists.txt +++ b/dpctl/CMakeLists.txt @@ -105,7 +105,7 @@ set(CMAKE_INSTALL_RPATH "$ORIGIN") function(build_dpctl_ext _trgt _src _dest) set(options SYCL) - cmake_parse_arguments(BUILD_DPCTL_EXT "${options}" "" "" ${ARGN}) + cmake_parse_arguments(BUILD_DPCTL_EXT "${options}" "RELATIVE_PATH" "" ${ARGN}) add_cython_target(${_trgt} ${_src} CXX OUTPUT_VAR _generated_src) set(_cythonize_trgt "${_trgt}_cythonize_pyx") Python_add_library(${_trgt} MODULE WITH_SOABI ${_generated_src}) @@ -147,11 +147,11 @@ function(build_dpctl_ext _trgt _src _dest) # TODO: do not set directory if we did not generate header target_include_directories(${_trgt} INTERFACE ${_generated_src_dir_dir}) set(_rpath_value "$ORIGIN") + if (BUILD_DPCTL_EXT_RELATIVE_PATH) + set(_rpath_value "${_rpath_value}/${BUILD_DPCTL_EXT_RELATIVE_PATH}") + endif() if (DPCTL_WITH_REDIST) - get_filename_component(_src_dir ${_src} DIRECTORY) - cmake_path(RELATIVE_PATH CMAKE_SOURCE_DIR BASE_DIRECTORY ${_src_dir} OUTPUT_VARIABLE _relative_path) - string(JOIN ":" _expanded_rpath_value ${_rpath_value} "$ORIGIN/${_relative_path}/../../") - set(_rpath_value ${_expanded_rpath_value}) + set(_rpath_value "${_rpath_value}:${_rpath_value}/../../..") endif() set_target_properties(${_trgt} PROPERTIES INSTALL_RPATH ${_rpath_value}) diff --git a/dpctl/memory/CMakeLists.txt b/dpctl/memory/CMakeLists.txt index cccc30b505..161f67ecba 100644 --- a/dpctl/memory/CMakeLists.txt +++ b/dpctl/memory/CMakeLists.txt @@ -1,7 +1,7 @@ set(_cy_file ${CMAKE_CURRENT_SOURCE_DIR}/_memory.pyx) get_filename_component(_trgt ${_cy_file} NAME_WLE) -build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/memory" SYCL) +build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/memory" SYCL RELATIVE_PATH "..") # _memory include _opaque_smart_ptr.hpp target_include_directories(${_trgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(DpctlCAPI INTERFACE ${_trgt}_headers) diff --git a/dpctl/program/CMakeLists.txt b/dpctl/program/CMakeLists.txt index 3e7598c817..e55d5b0e08 100644 --- a/dpctl/program/CMakeLists.txt +++ b/dpctl/program/CMakeLists.txt @@ -2,6 +2,6 @@ file(GLOB _cython_sources *.pyx) foreach(_cy_file ${_cython_sources}) get_filename_component(_trgt ${_cy_file} NAME_WLE) - build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/program") + build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/program" RELATIVE_PATH "..") target_link_libraries(DpctlCAPI INTERFACE ${_trgt}_headers) endforeach() diff --git a/dpctl/tensor/CMakeLists.txt b/dpctl/tensor/CMakeLists.txt index 407aa624fd..42f8d5575e 100644 --- a/dpctl/tensor/CMakeLists.txt +++ b/dpctl/tensor/CMakeLists.txt @@ -1,7 +1,7 @@ file(GLOB _cython_sources *.pyx) foreach(_cy_file ${_cython_sources}) get_filename_component(_trgt ${_cy_file} NAME_WLE) - build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/tensor") + build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/tensor" RELATIVE_PATH "..") target_include_directories(${_trgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) target_link_libraries(DpctlCAPI INTERFACE ${_trgt}_headers) endforeach() diff --git a/dpctl/utils/CMakeLists.txt b/dpctl/utils/CMakeLists.txt index 9ee799aeee..fa000787cf 100644 --- a/dpctl/utils/CMakeLists.txt +++ b/dpctl/utils/CMakeLists.txt @@ -2,7 +2,7 @@ file(GLOB _cython_sources *.pyx) foreach(_cy_file ${_cython_sources}) get_filename_component(_trgt ${_cy_file} NAME_WLE) - build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/utils") + build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/utils" RELATIVE_PATH "..") endforeach() set(_pybind11_targets) From a295c11577ab573e1705be2caa47a38d8729926f Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Nov 2024 09:49:37 -0800 Subject: [PATCH 14/14] Replace setting LD_LIBRARY_PATH with setting LIBRARY_PATH based on the preceding comment --- conda-recipe/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 604723d983..1ca6329e3a 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # This is necessary to help DPC++ find Intel libraries such as SVML, IRNG, etc in build prefix -export LIBRARY_PATH="$LD_LIBRARY_PATH:${BUILD_PREFIX}/lib" +export LIBRARY_PATH="$LIBRARY_PATH:${BUILD_PREFIX}/lib" # Intel LLVM must cooperate with compiler and sysroot from conda echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg