Skip to content

Commit

Permalink
[UR] Bump UR version and enable dynamic linking with UMF (intel#13343)
Browse files Browse the repository at this point in the history
Testing PR for: oneapi-src/unified-runtime#1430

---------

Co-authored-by: Krzysztof Swiecicki <krzysztof.swiecicki@intel.com>
Co-authored-by: Steffen Larsen <steffen.larsen@intel.com>
  • Loading branch information
3 people authored and hdelan committed Jul 26, 2024
1 parent 9c2d6ae commit 5401161
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
run: |
sudo apt-get update
# swig and graphviz are lldb specific dependencies
sudo apt-get install -y cmake ninja-build swig graphviz
sudo apt-get install -y cmake ninja-build swig graphviz libhwloc-dev
- name: Build LLVM docs
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ jobs:
graphviz \
python3-github \
ninja-build \
texlive-font-utils
texlive-font-utils \
libhwloc-dev
pip3 install --user -r ./llvm/docs/requirements.txt
- name: Build Documentation
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ jobs:
graphviz \
python3-github \
ninja-build \
texlive-font-utils
texlive-font-utils \
libhwloc-dev
pip3 install --user -r ./llvm/docs/requirements.txt
- name: Build Doxygen
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sycl-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
path: repo
- name: Install deps
run: |
sudo apt-get install -y doxygen graphviz ssh ninja-build
sudo apt-get install -y doxygen graphviz ssh ninja-build libhwloc-dev
sudo pip3 install -r repo/llvm/docs/requirements.txt
- name: Build Docs
run: |
Expand Down
2 changes: 2 additions & 0 deletions sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ and a wide range of compute accelerators such as GPU and FPGA.
* `python` - [Download](https://www.python.org/downloads/)
* `ninja` -
[Download](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages)
* `hwloc` version 2.3 or later (Linux only)
* libhwloc-dev or hwloc-devel package on linux
* C++ compiler
* See LLVM's [host compiler toolchain requirements](https://github.com/intel/llvm/blob/sycl/llvm/docs/GettingStarted.rst#host-c-toolchain-both-compiler-and-standard-library)

Expand Down
33 changes: 24 additions & 9 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set(SYCL_PI_UR_SOURCE_DIR

# Override default to enable building tests from unified-runtime
set(UR_BUILD_TESTS OFF CACHE BOOL "Build unit tests.")
set(UMF_ENABLE_POOL_TRACKING ON)

if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
set(UR_BUILD_ADAPTER_L0 ON)
Expand Down Expand Up @@ -100,13 +99,21 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit e161516663bd5d14d15532dfaba626d5cdf32ed8
# Merge: 47633088 febb18bb
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
# Date: Wed Jul 24 13:54:43 2024 +0100
# Merge pull request #1521 from AllanZyne/review/yang/dg2
# [DeviceSanitizer] Support GPU DG2 & GEN Device
set(UNIFIED_RUNTIME_TAG e161516663bd5d14d15532dfaba626d5cdf32ed8)
# commit 3d8fe8d298cec8db624fc230fa5c0e19865aa6f1
# Merge: e8c9f3db 0a259f33
# Author: Piotr Balcer <piotr.balcer@intel.com>
# Date: Thu Jul 25 15:13:00 2024 +0200
# Merge pull request #1430 from igchor/umf_dynamic_linking
# Bump UMF version and switch to dynamic linking
set(UNIFIED_RUNTIME_TAG 3d8fe8d298cec8db624fc230fa5c0e19865aa6f1)

set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need
# to link statically on windows
if(WIN32)
set(UMF_BUILD_SHARED_LIBRARY OFF CACHE INTERNAL "Build UMF shared library")
set(UMF_LINK_HWLOC_STATICALLY ON CACHE INTERNAL "static HWLOC")
endif()

fetch_adapter_source(level_zero
${UNIFIED_RUNTIME_REPO}
Expand Down Expand Up @@ -192,7 +199,7 @@ set(UNIFIED_RUNTIME_COMMON_INCLUDE_DIR "${UNIFIED_RUNTIME_SOURCE_DIR}/source/com

add_library(UnifiedRuntimeLoader ALIAS ur_loader)
add_library(UnifiedRuntimeCommon ALIAS ur_common)
add_library(UnifiedMemoryFramework ALIAS umf)
add_library(UnifiedMemoryFramework ALIAS ur_umf)

add_library(UnifiedRuntime-Headers INTERFACE)

Expand Down Expand Up @@ -291,3 +298,11 @@ if ("native_cpu" IN_LIST SYCL_ENABLE_PLUGINS)
Some valid SYCL programs may not build or may have low performance.")
endif()
endif()

add_dependencies(sycl-runtime-libraries ur_umf)

# TODO: this is piggy-backing on the existing target component level-zero-sycl-dev
install(TARGETS umf
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
RUNTIME DESTINATION "bin" COMPONENT level-zero-sycl-dev)
6 changes: 5 additions & 1 deletion sycl/test-e2e/Basic/get_info_aspect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

// REQUIRES: gpu, level_zero
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
// RUN: env ZES_ENABLE_SYSMAN=0 %{run} %t.out
// Explicitly set 'ZES_ENABLE_SYSMAN=0'. HWLOC initializes this environment
// variable in its constructor, causing this test to fail, as retrieving
// free memory information is expected not to work in this test.
// For more context, see: https://github.com/oneapi-src/level-zero/issues/36.

#include <sycl/detail/core.hpp>
int main() {
Expand Down

0 comments on commit 5401161

Please sign in to comment.