Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UR] Enable hwloc in UMF linux build #15261

Draft
wants to merge 2 commits into
base: sycl
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sycl-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
path: repo
- name: Install deps
run: |
sudo apt-get install -y graphviz ssh ninja-build libhwloc-dev
sudo apt-get install -y graphviz ssh ninja-build
sudo pip3 install -r repo/llvm/docs/requirements.txt
- name: Build Docs
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sycl-macos-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
CCACHE_MAXSIZE: ${{ inputs.build_cache_size }}
steps:
- name: Install dependencies
run: brew install ccache ninja hwloc zstd
run: brew install ccache ninja automake zstd
- uses: actions/checkout@v4
with:
ref: ${{ inputs.build_ref }}
Expand Down
1 change: 0 additions & 1 deletion devops/scripts/install_build_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ apt update && apt install -yqq \
unzip \
jq \
curl \
libhwloc-dev \
libzstd-dev \
time

Expand Down
11 changes: 4 additions & 7 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ option(SYCL_UR_USE_FETCH_CONTENT
set(SYCL_UR_SOURCE_DIR
"" CACHE PATH "Path to root of Unified Runtime repository")

option(SYCL_UMF_DISABLE_HWLOC
"Disable hwloc support in UMF" ON)

# Here we override the defaults to disable building tests from unified-runtime
set(UR_BUILD_EXAMPLES OFF CACHE BOOL "Build example applications." FORCE)
set(UR_BUILD_TESTS OFF CACHE BOOL "Build unit tests." FORCE)
Expand Down Expand Up @@ -116,18 +113,18 @@ if(SYCL_UR_USE_FETCH_CONTENT)
CACHE PATH "Path to external '${name}' adapter source dir" FORCE)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
set(UNIFIED_RUNTIME_REPO "https://github.com/lukaszstolarczuk/unified-runtime.git")
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/UnifiedRuntimeTag.cmake)

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")
else()
set(UMF_DISABLE_HWLOC ${SYCL_UMF_DISABLE_HWLOC} CACHE INTERNAL "Disable hwloc for UMF")
endif()

set(UMF_LINK_HWLOC_STATICALLY ON CACHE INTERNAL "static HWLOC")
set(UMF_HWLOC_TAG hwloc-2.9.3 CACHE INTERNAL "hwloc version")

fetch_adapter_source(level_zero
${UNIFIED_RUNTIME_REPO}
Expand Down
13 changes: 6 additions & 7 deletions sycl/cmake/modules/UnifiedRuntimeTag.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# commit b841691699393dd2375e987c3d38d5f59c3e35cf
# Merge: c6859445 9de10cd9
# Author: Kenneth Benzie (Benie) <[email protected]>
# Date: Thu Jan 23 16:07:06 2025 +0000
# Merge pull request #2559 from Bensuo/fix_kernel_arg_indices
# [CUDA][HIP] Fix kernel arguments being overwritten when added out of order
set(UNIFIED_RUNTIME_TAG b841691699393dd2375e987c3d38d5f59c3e35cf)
# commit a5b080d194a72cc9d5b2fbc9c8c368ebe597588f (HEAD -> bump-umf-0.11, origin/bump-umf-0.11)
# Author: Łukasz Stolarczuk <[email protected]>
# Date: Wed Jan 22 11:06:11 2025 +0100
# [common] Bump UMF to early 0.11 version, from main
# It includes i.a. MacOS fix for compiler.
set(UNIFIED_RUNTIME_TAG a5b080d194a72cc9d5b2fbc9c8c368ebe597588f)
3 changes: 1 addition & 2 deletions sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ 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
Comment on lines -47 to -48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update UR to statically link hwloc v2.9.3 both on linux and Windows.

If I get the change right, the dependency on hwloc still exists. The change removed the runtime dependency, but not the compile time dependency. Am I right?

This document describes the environment for DPC++ compiler developers, not DPC++ compiler users.

Your change seems to raise the version requirement. Please, update the hwloc version to 2.9.3.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hwloc library will always be fetched from sources. Regardless of hwloc-dev packages user has installed, the fetched version will be linked with the UMF library. That's why I remove hwloc from this dependencies list, as the user-installed hwloc-dev package will not be used by UMF.

* 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)
* `automake` - [Download](https://www.gnu.org/software/automake/)

Alternatively, you can create a Docker image that has everything you need for
building pre-installed using the [Ubuntu 24.04 build Dockerfile](https://github.com/intel/llvm/blob/sycl/devops/containers/ubuntu2404_build.Dockerfile).
Expand Down
Loading