Skip to content

Commit fbdb6a3

Browse files
authored
Merge branch 'main' into peter/werror
2 parents 1f09edf + 42874bc commit fbdb6a3

File tree

12 files changed

+53
-22
lines changed

12 files changed

+53
-22
lines changed

.github/workflows/bandit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ concurrency:
77
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
88
cancel-in-progress: true
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
linux:
1215
name: Bandit

.github/workflows/cmake.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ concurrency:
66
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
77
cancel-in-progress: true
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
ubuntu-build:
1114
name: Build - Ubuntu

.github/workflows/codeql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ concurrency:
66
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
77
cancel-in-progress: true
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
analyze-ubuntu:
1114
name: Analyze on Ubuntu

.github/workflows/coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Coverage
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
ubuntu-build:
710
name: Build - Ubuntu

.github/workflows/coverity.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ env:
2323
COVERITY_SCAN_BRANCH_PATTERN: "main"
2424
TRAVIS_BRANCH: ${{ github.ref_name }}
2525

26+
permissions:
27+
contents: read
2628

2729
jobs:
2830
linux:
@@ -51,6 +53,7 @@ jobs:
5153
-DCUDA_CUDA_LIBRARY=/usr/local/cuda/lib64/stubs/libcuda.so
5254
-DUR_BUILD_ADAPTER_NATIVE_CPU=ON
5355
-DUR_BUILD_ADAPTER_HIP=ON
56+
-DUR_BUILD_ADAPTER_OPENCL=ON
5457
5558
- name: Run Coverity
5659
run: |

.github/workflows/e2e_nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
# Run every day at 23:00 UTC
66
- cron: '0 23 * * *'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
e2e-build-hw:
1013
name: Build SYCL, UR, run E2E

.github/workflows/nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
# Run every day at 23:00 UTC
66
- cron: '0 23 * * *'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
long-fuzz-test:
1013
name: Run long fuzz tests

.github/workflows/prerelease.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
# At 23:00 on Friday, GitHub actions schedule is in UTC time.
77
- cron: 0 23 * * 5
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
weekly-prerelease:
1114
runs-on: ubuntu-latest

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ List of options provided by CMake:
137137
| UR_ENABLE_COMGR | Enable comgr lib usage | AMD/NVIDIA | AMD |
138138
| UR_DPCXX | Path of the DPC++ compiler executable to build CTS device binaries | File path | `""` |
139139
| UR_SYCL_LIBRARY_DIR | Path of the SYCL runtime library directory to build CTS device binaries | Directory path | `""` |
140+
| UR_HIP_ROCM_DIR | Path of the default ROCm HIP installation | Directory path | `/opt/rocm` |
141+
| UR_HIP_INCLUDE_DIR | Path of the ROCm HIP include directory | Directory path | `${UR_HIP_ROCM_DIR}/include` |
142+
| UR_HIP_HSA_INCLUDE_DIRS | Path of the ROCm HSA include directory | Directory path | `${UR_HIP_ROCM_DIR}/hsa/include;${UR_HIP_ROCM_DIR}/include` |
143+
| UR_HIP_LIB_DIR | Path of the ROCm HIP library directory | Directory path | `${UR_HIP_ROCM_DIR}/lib` |
140144

141145
### Additional make targets
142146

source/adapters/hip/CMakeLists.txt

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ set(UR_HIP_PLATFORM "AMD" CACHE STRING "UR HIP platform, AMD or NVIDIA")
1010

1111
# Set default ROCm installation directory
1212
set(UR_HIP_ROCM_DIR "/opt/rocm" CACHE STRING "ROCm installation dir")
13-
14-
set(UR_HIP_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/include")
15-
16-
set(UR_HIP_HSA_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/hsa/include")
17-
18-
# Set HIP lib dir
19-
set(UR_HIP_LIB_DIR "${UR_HIP_ROCM_DIR}/lib")
13+
# Allow custom location of HIP/HSA include and HIP library directories
14+
set(UR_HIP_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/include" CACHE PATH
15+
"Custom ROCm HIP include dir")
16+
set(UR_HIP_HSA_INCLUDE_DIRS
17+
"${UR_HIP_ROCM_DIR}/hsa/include;${UR_HIP_ROCM_DIR}/include" CACHE FILEPATH
18+
"Custom ROCm HSA include dir")
19+
set(UR_HIP_LIB_DIR "${UR_HIP_ROCM_DIR}/lib" CACHE PATH
20+
"Custom ROCm HIP library dir")
2021

2122
# Check if HIP library path exists (AMD platform only)
2223
if("${UR_HIP_PLATFORM}" STREQUAL "AMD")
@@ -30,10 +31,18 @@ if("${UR_HIP_PLATFORM}" STREQUAL "AMD")
3031
" please check ROCm installation.")
3132
endif()
3233

33-
# Check if HSA include path exists
34-
if(NOT EXISTS "${UR_HIP_HSA_INCLUDE_DIR}")
35-
message(FATAL_ERROR "Couldn't find the HSA include directory at '${UR_HIP_HSA_INCLUDE_DIR}',"
36-
" please check ROCm installation.")
34+
# Check if HSA include path exists. In rocm-6.0.0 the layout of HSA
35+
# directory has changed, check for the new location as well.
36+
foreach(D IN LISTS UR_HIP_HSA_INCLUDE_DIRS)
37+
if(EXISTS "${D}")
38+
set(UR_HIP_HSA_INCLUDE_DIR "${D}")
39+
break()
40+
endif()
41+
endforeach()
42+
if(NOT UR_HIP_HSA_INCLUDE_DIR)
43+
message(FATAL_ERROR "Couldn't find the HSA include directory in any of "
44+
"these paths: '${UR_HIP_HSA_INCLUDE_DIRS}'. Please check ROCm "
45+
"installation.")
3746
endif()
3847
endif()
3948

0 commit comments

Comments
 (0)