Skip to content

Commit 5e01636

Browse files
committed
Move Unified Runtime code into intel/llvm
This PR pulls in the entire git history of the https://github.com/oneapi-src/unified-runtime project. The following fixup commits are also included: * bbc1f73 [UR] Cleanup GitHub directory * 8f0d7e3 [UR] Ensure UNIFIED_RUNTIME_SOURCE_DIR is set * eed4250 [UR] Ensure UMF options are set * 422551e [LIBDEVICE][UR] Ensure UR_SANITIZER_INCLUDE_DIR is set
2 parents b969205 + 86149d0 commit 5e01636

File tree

872 files changed

+270749
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

872 files changed

+270749
-2
lines changed

libdevice/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ set(CMAKE_MODULE_PATH
88
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
99
)
1010

11-
if(EXISTS ${FETCHCONTENT_BASE_DIR}/unified-runtime-src)
11+
set(UR_INTREE_SOURCE_DIR "${LLVM_SOURCE_DIR}/../unified-runtime")
12+
cmake_path(NORMAL_PATH UR_INTREE_SOURCE_DIR OUTPUT_VARIABLE UR_INTREE_SOURCE_DIR)
13+
14+
if(IS_DIRECTORY "${UR_INTREE_SOURCE_DIR}")
15+
set(UR_SANITIZER_INCLUDE_DIR
16+
${UR_INTREE_SOURCE_DIR}/source/loader/layers/sanitizer)
17+
elseif(EXISTS ${FETCHCONTENT_BASE_DIR}/unified-runtime-src)
1218
set(UR_SANITIZER_INCLUDE_DIR
1319
${FETCHCONTENT_BASE_DIR}/unified-runtime-src/source/loader/layers/sanitizer)
1420
elseif(EXISTS ${SYCL_UR_SOURCE_DIR})

sycl/cmake/modules/FetchUnifiedRuntime.cmake

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,19 @@ cmake_path(NORMAL_PATH UR_INTREE_SOURCE_DIR OUTPUT_VARIABLE UR_INTREE_SOURCE_DIR
7575

7676
if(IS_DIRECTORY "${UR_INTREE_SOURCE_DIR}")
7777
set(UR_INTREE_BINARY_DIR ${LLVM_BINARY_DIR}/unified-runtime)
78-
add_subdirectory(${UR_INTREE_SOURCE_DIR} ${UR_INTREE_BINARY_DIR})
78+
set(UNIFIED_RUNTIME_SOURCE_DIR
79+
"${UR_INTREE_SOURCE_DIR}" CACHE PATH
80+
"Path to Unified Runtime Headers" FORCE)
81+
set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
82+
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need
83+
# to link statically on windows
84+
if(WIN32)
85+
set(UMF_BUILD_SHARED_LIBRARY OFF CACHE INTERNAL "Build UMF shared library")
86+
set(UMF_LINK_HWLOC_STATICALLY ON CACHE INTERNAL "static HWLOC")
87+
else()
88+
set(UMF_DISABLE_HWLOC ${SYCL_UMF_DISABLE_HWLOC} CACHE INTERNAL "Disable hwloc for UMF")
89+
endif()
90+
add_subdirectory(${UNIFIED_RUNTIME_SOURCE_DIR} ${UR_INTREE_BINARY_DIR})
7991
elseif(SYCL_UR_USE_FETCH_CONTENT)
8092
include(FetchContent)
8193

unified-runtime/.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: LLVM
4+
...

unified-runtime/.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[*]
2+
indent_style = space
3+
indent_size = 2
4+
5+
[*.py]
6+
indent_size = 4
7+
8+
[scripts/core/*]
9+
indent_size = 4
10+
11+
[CMakeLists.txt]
12+
indent_size = 4
13+
14+
[*.cmake]
15+
indent_size = 4

unified-runtime/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2023 Intel Corporation
4+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See LICENSE.TXT
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
8+
# get_system_info.sh - Script for printing system info
9+
10+
function check_L0_version {
11+
if command -v dpkg &> /dev/null; then
12+
dpkg -l | grep level-zero && return
13+
fi
14+
15+
if command -v rpm &> /dev/null; then
16+
rpm -qa | grep level-zero && return
17+
fi
18+
19+
if command -v zypper &> /dev/null; then
20+
zypper se level-zero && return
21+
fi
22+
23+
echo "level-zero not installed"
24+
}
25+
26+
function system_info {
27+
echo "**********system_info**********"
28+
cat /etc/os-release | grep -oP "PRETTY_NAME=\K.*"
29+
cat /proc/version
30+
echo "**********SYCL-LS**********"
31+
source /opt/intel/oneapi/setvars.sh
32+
sycl-ls
33+
echo "**********VGA**********"
34+
lspci | grep VGA
35+
echo "**********CUDA Version**********"
36+
if command -v nvidia-smi &> /dev/null; then
37+
nvidia-smi
38+
else
39+
echo "CUDA not installed"
40+
fi
41+
echo "**********L0 Version**********"
42+
check_L0_version
43+
echo "**********ROCm Version**********"
44+
if command -v rocminfo &> /dev/null; then
45+
rocminfo
46+
else
47+
echo "ROCm not installed"
48+
fi
49+
echo "**********/proc/cmdline**********"
50+
cat /proc/cmdline
51+
echo "**********CPU info**********"
52+
lscpu
53+
echo "**********/proc/meminfo**********"
54+
cat /proc/meminfo
55+
echo "**********build/bin/urinfo**********"
56+
$(dirname "$(readlink -f "$0")")/../../build/bin/urinfo --no-linear-ids --verbose || true
57+
echo "******OpenCL*******"
58+
# The driver version of OpenCL Graphics is the compute-runtime version
59+
clinfo || echo "OpenCL not installed"
60+
echo "**********list-environment**********"
61+
echo "PATH=$PATH"
62+
echo
63+
echo "CPATH=$CPATH"
64+
echo
65+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
66+
echo
67+
echo "LIBRARY_PATH=$LIBRARY_PATH"
68+
echo
69+
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
70+
echo
71+
echo "******list-build-system-versions*******"
72+
gcc --version 2>/dev/null || true
73+
echo
74+
clang --version 2>/dev/null || true
75+
echo
76+
make --version 2>/dev/null || true
77+
echo "**********/proc/modules**********"
78+
cat /proc/modules
79+
echo "***************installed-packages***************"
80+
# Instructions below will return some minor errors, as they are dependent on the Linux distribution.
81+
zypper se --installed-only 2>/dev/null || true
82+
apt list --installed 2>/dev/null || true
83+
yum list installed 2>/dev/null || true
84+
}
85+
86+
# Call the function above to print system info.
87+
system_info

unified-runtime/.gitignore

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
*.exp
10+
*.pdb
11+
*.log
12+
*.tlog
13+
*.ilk
14+
*.idb
15+
*.CopyComplete
16+
*.pyc
17+
*.tmp
18+
19+
# Precompiled Headers
20+
*.gch
21+
*.pch
22+
*.ipch
23+
24+
# Compiled Dynamic libraries
25+
*.so
26+
*.dylib
27+
*.dll
28+
29+
# Project files
30+
*.sln
31+
*.vcproj
32+
*.vcxproj
33+
*.pyproj
34+
*.suo
35+
*.db
36+
*.opendb
37+
*.user
38+
*.filters
39+
.vs/
40+
.idea/
41+
42+
# Compiled Static libraries
43+
*.lai
44+
*.la
45+
*.a
46+
*.lib
47+
48+
# Executables
49+
*.exe
50+
*.out
51+
*.app
52+
53+
# Debug files
54+
scripts/**/*.json
55+
56+
# Python cache
57+
__pycache__/
58+
*.py[cod]
59+
60+
# Generated docs
61+
docs/
62+
63+
# Build files
64+
/build*/
65+
out/
66+
67+
# irepo files
68+
.irepo
69+
70+
# ci deps
71+
.deps
72+
73+
# third_party files
74+
/third_party/*/
75+
76+
77+
# VS CMake settings
78+
/CMakeSettings.json
79+
80+
# Temporary files
81+
*.~vsdx
82+
83+
# IDE Files
84+
/.vscode
85+
/.devcontainer
86+
87+
# External content
88+
*/**/external
89+
90+
# VS clangd
91+
/.cache
92+
/compile_commands.json

unified-runtime/.trivyignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Docs: https://aquasecurity.github.io/trivy/latest/docs/configuration/filtering/#trivyignore
2+
3+
# In docker files:
4+
# HEALTHCHECK is not required for development, nor in CI (failed docker = failed CI).
5+
# We're not hosting any application with usage of the dockers.
6+
AVD-DS-0026

unified-runtime/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Unified Runtime changelog
2+
3+
## v.X.X.X
4+
* Placeholder for first release

0 commit comments

Comments
 (0)