Skip to content

Commit 33c0829

Browse files
igchorkswiecickisteffenlarsen
authored
[UR] Bump UR version and enable dynamic linking with UMF (#13343)
Testing PR for: oneapi-src/unified-runtime#1430 --------- Co-authored-by: Krzysztof Swiecicki <[email protected]> Co-authored-by: Steffen Larsen <[email protected]>
1 parent 33325d4 commit 33c0829

File tree

7 files changed

+37
-14
lines changed

7 files changed

+37
-14
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
run: |
112112
sudo apt-get update
113113
# swig and graphviz are lldb specific dependencies
114-
sudo apt-get install -y cmake ninja-build swig graphviz
114+
sudo apt-get install -y cmake ninja-build swig graphviz libhwloc-dev
115115
- name: Build LLVM docs
116116
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
117117
run: |

.github/workflows/release-documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
graphviz \
5050
python3-github \
5151
ninja-build \
52-
texlive-font-utils
52+
texlive-font-utils \
53+
libhwloc-dev
5354
pip3 install --user -r ./llvm/docs/requirements.txt
5455
5556
- name: Build Documentation

.github/workflows/release-doxygen.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252
graphviz \
5353
python3-github \
5454
ninja-build \
55-
texlive-font-utils
55+
texlive-font-utils \
56+
libhwloc-dev
5657
pip3 install --user -r ./llvm/docs/requirements.txt
5758
5859
- name: Build Doxygen

.github/workflows/sycl-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
path: repo
2626
- name: Install deps
2727
run: |
28-
sudo apt-get install -y doxygen graphviz ssh ninja-build
28+
sudo apt-get install -y doxygen graphviz ssh ninja-build libhwloc-dev
2929
sudo pip3 install -r repo/llvm/docs/requirements.txt
3030
- name: Build Docs
3131
run: |

sycl/doc/GetStartedGuide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ and a wide range of compute accelerators such as GPU and FPGA.
4343
* `python` - [Download](https://www.python.org/downloads/)
4444
* `ninja` -
4545
[Download](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages)
46+
* `hwloc` version 2.3 or later (Linux only)
47+
* libhwloc-dev or hwloc-devel package on linux
4648
* C++ compiler
4749
* 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)
4850

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ set(SYCL_PI_UR_SOURCE_DIR
1717

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

2221
if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
2322
set(UR_BUILD_ADAPTER_L0 ON)
@@ -100,13 +99,21 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
10099
endfunction()
101100

102101
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
103-
# commit e161516663bd5d14d15532dfaba626d5cdf32ed8
104-
# Merge: 47633088 febb18bb
105-
# Author: Kenneth Benzie (Benie) <[email protected]>
106-
# Date: Wed Jul 24 13:54:43 2024 +0100
107-
# Merge pull request #1521 from AllanZyne/review/yang/dg2
108-
# [DeviceSanitizer] Support GPU DG2 & GEN Device
109-
set(UNIFIED_RUNTIME_TAG e161516663bd5d14d15532dfaba626d5cdf32ed8)
102+
# commit 3d8fe8d298cec8db624fc230fa5c0e19865aa6f1
103+
# Merge: e8c9f3db 0a259f33
104+
# Author: Piotr Balcer <[email protected]>
105+
# Date: Thu Jul 25 15:13:00 2024 +0200
106+
# Merge pull request #1430 from igchor/umf_dynamic_linking
107+
# Bump UMF version and switch to dynamic linking
108+
set(UNIFIED_RUNTIME_TAG 3d8fe8d298cec8db624fc230fa5c0e19865aa6f1)
109+
110+
set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
111+
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need
112+
# to link statically on windows
113+
if(WIN32)
114+
set(UMF_BUILD_SHARED_LIBRARY OFF CACHE INTERNAL "Build UMF shared library")
115+
set(UMF_LINK_HWLOC_STATICALLY ON CACHE INTERNAL "static HWLOC")
116+
endif()
110117

111118
fetch_adapter_source(level_zero
112119
${UNIFIED_RUNTIME_REPO}
@@ -192,7 +199,7 @@ set(UNIFIED_RUNTIME_COMMON_INCLUDE_DIR "${UNIFIED_RUNTIME_SOURCE_DIR}/source/com
192199

193200
add_library(UnifiedRuntimeLoader ALIAS ur_loader)
194201
add_library(UnifiedRuntimeCommon ALIAS ur_common)
195-
add_library(UnifiedMemoryFramework ALIAS umf)
202+
add_library(UnifiedMemoryFramework ALIAS ur_umf)
196203

197204
add_library(UnifiedRuntime-Headers INTERFACE)
198205

@@ -291,3 +298,11 @@ if ("native_cpu" IN_LIST SYCL_ENABLE_PLUGINS)
291298
Some valid SYCL programs may not build or may have low performance.")
292299
endif()
293300
endif()
301+
302+
add_dependencies(sycl-runtime-libraries ur_umf)
303+
304+
# TODO: this is piggy-backing on the existing target component level-zero-sycl-dev
305+
install(TARGETS umf
306+
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
307+
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
308+
RUNTIME DESTINATION "bin" COMPONENT level-zero-sycl-dev)

sycl/test-e2e/Basic/get_info_aspect.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

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

812
#include <sycl/detail/core.hpp>
913
int main() {

0 commit comments

Comments
 (0)