Skip to content

Unable to point to a static, offline copy of dependencies #2740

Open

Description

@bwarden

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.

# 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.

Activity

  1. alycm commented on Mar 27, 2025

    @alycm
    Contributor

    Note this is the same use-case, but with different suggestions, as #2494.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    level-zeroL0 adapter specific issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions