-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
level-zeroL0 adapter specific issuesL0 adapter specific issues
Description
In order to package this software for a distribution, or any software that requires it as part of its own build (such as DPC++ Compiler), it is essential that all necessary source code can be downloaded and provided offline, such that the build will not attempt to retrieve anything from the internet.
unified-runtime/cmake/FetchLevelZero.cmake
Lines 112 to 124 in 6b5dec6
# Sparse fetch only the dir with level zero headers for experimental features to avoid pulling in the entire compute-runtime. | |
FetchContentSparse_Declare(exp-headers ${UR_COMPUTE_RUNTIME_REPO} "${UR_COMPUTE_RUNTIME_TAG}" "level_zero/include") | |
FetchContent_GetProperties(exp-headers) | |
if(NOT exp-headers_POPULATED) | |
FetchContent_Populate(exp-headers) | |
endif() | |
add_library(ComputeRuntimeLevelZero-Headers INTERFACE) | |
set(COMPUTE_RUNTIME_LEVEL_ZERO_INCLUDE "${exp-headers_SOURCE_DIR}/../..") | |
message(STATUS "Level Zero Adapter: Using Level Zero headers from ${COMPUTE_RUNTIME_LEVEL_ZERO_INCLUDE}") | |
target_include_directories(ComputeRuntimeLevelZero-Headers | |
INTERFACE "$<BUILD_INTERFACE:${COMPUTE_RUNTIME_LEVEL_ZERO_INCLUDE}>" | |
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" | |
) |
Ideally, cmake's own methods such as find_package should be used, but lacking that, I should be able to provide variables that point to wherever I have unpacked compute-runtime.
Metadata
Metadata
Assignees
Labels
level-zeroL0 adapter specific issuesL0 adapter specific issues