Skip to content

Commit d7a676d

Browse files
committed
Use conda distibuted level-zero package
1 parent 96da3e8 commit d7a676d

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

conda-recipe/bld.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ set "CMAKE_GENERATOR=Ninja"
3838
:: Make CMake verbose
3939
set "VERBOSE=1"
4040

41+
set "CMAKE_ARGS=%CMAKE_ARGS% -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=%PREFIX:\=/%/Library/include/level_zero"
42+
4143
%PYTHON% -m build -w -n -x
4244
if %ERRORLEVEL% neq 0 exit 1
4345

conda-recipe/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export CMAKE_GENERATOR=Ninja
1919
# Make CMake verbose
2020
export VERBOSE=1
2121

22+
CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level_zero"
23+
2224
# -wnx flags mean: --wheel --no-isolation --skip-dependency-check
2325
${PYTHON} -m build -w -n -x
2426
${PYTHON} -m wheel tags --remove --build "$GIT_DESCRIBE_NUMBER" \

conda-recipe/meta.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ requirements:
2929
host:
3030
- python
3131
- pip >=24.0
32-
- git
33-
# In case use forces ssh over https for git repository interaction we
34-
# must have compatible SSL library version
35-
- openssh
32+
- level-zero-devel >=1.16
3633
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
3734
# Ensure we are using latest version of setuptools, since we don't need
3835
# editable environments for release.
@@ -58,7 +55,7 @@ requirements:
5855
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
5956
- {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }}
6057
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}
61-
- level-zero # [linux]
58+
- {{ pin_compatible('level-zero', min_pin='x.x', max_pin='x') }} # [linux]
6259

6360
test:
6461
requires:

libsyclinterface/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ option(DPCTL_ENABLE_GLOG
4242
OFF
4343
)
4444

45+
set(DPCTL_LEVEL_ZERO_INCLUDE_DIR "" CACHE STRING "Level zero header path")
46+
4547
# Minimum version requirement only when oneAPI dpcpp is used.
4648
if(DPCTL_DPCPP_FROM_ONEAPI)
4749
find_package(IntelSyclCompiler 2021.3.0 REQUIRED)
@@ -51,8 +53,12 @@ endif()
5153

5254
if(DPCTL_ENABLE_L0_PROGRAM_CREATION)
5355
set(DPCTL_ENABLE_L0_PROGRAM_CREATION 1)
54-
include(GetLevelZeroHeaders)
55-
get_level_zero_headers()
56+
if(DPCTL_LEVEL_ZERO_INCLUDE_DIR)
57+
set(LEVEL_ZERO_INCLUDE_DIR ${DPCTL_LEVEL_ZERO_INCLUDE_DIR})
58+
else()
59+
include(GetLevelZeroHeaders)
60+
get_level_zero_headers()
61+
endif()
5662
if (UNIX)
5763
find_library(PI_LEVEL_ZERO_LIB
5864
NAMES pi_level_zero

0 commit comments

Comments
 (0)