[Openmp-commits] [PATCH] D109885: [MLIR][[amdgpu-arch]][OpenMP] Remove direct dependency on /opt/rocm
DineshKumar Bhaskaran via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Sep 16 07:29:36 PDT 2021
dbhaskaran created this revision.
dbhaskaran added reviewers: pdhaliwal, csigg, JonChesterfield.
Herald added subscribers: wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, kerbowa, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, guansong, t-tye, tpr, dstuttard, yaxunl, mgorny, nhaehnle, jvesely, kzhuravl.
dbhaskaran requested review of this revision.
Herald added subscribers: openmp-commits, cfe-commits, sstefan1, stephenneuendorffer, nicolasvasilache, wdng.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: herhut.
Herald added projects: clang, OpenMP, MLIR.
This avoids undefined behavior/issues resulting out of unconventional
or co-existing ROCm installations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109885
Files:
clang/tools/amdgpu-arch/CMakeLists.txt
mlir/lib/Dialect/GPU/CMakeLists.txt
mlir/lib/ExecutionEngine/CMakeLists.txt
openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
Index: openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
+++ openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
@@ -14,7 +14,7 @@
################################################################################
# as of rocm-3.7, hsa is installed with cmake packages and kmt is found via hsa
-find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
+find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX})
if(NOT LIBOMPTARGET_DEP_LIBELF_FOUND)
libomptarget_say("Not building AMDGPU plugin: LIBELF not found")
Index: mlir/lib/ExecutionEngine/CMakeLists.txt
===================================================================
--- mlir/lib/ExecutionEngine/CMakeLists.txt
+++ mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -142,7 +142,7 @@
# Configure ROCm support.
if (NOT DEFINED ROCM_PATH)
if (NOT DEFINED ENV{ROCM_PATH})
- set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to which ROCm has been installed")
+ message(SEND_ERROR "Building mlir with ROCm support requires a working ROCm")
else()
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which ROCm has been installed")
endif()
Index: mlir/lib/Dialect/GPU/CMakeLists.txt
===================================================================
--- mlir/lib/Dialect/GPU/CMakeLists.txt
+++ mlir/lib/Dialect/GPU/CMakeLists.txt
@@ -127,7 +127,7 @@
# Configure ROCm support.
if (NOT DEFINED ROCM_PATH)
if (NOT DEFINED ENV{ROCM_PATH})
- set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to which ROCm has been installed")
+ message(SEND_ERROR "Building mlir with ROCm support requires a working ROCm")
else()
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which ROCm has been installed")
endif()
Index: clang/tools/amdgpu-arch/CMakeLists.txt
===================================================================
--- clang/tools/amdgpu-arch/CMakeLists.txt
+++ clang/tools/amdgpu-arch/CMakeLists.txt
@@ -6,7 +6,7 @@
# //
# //===----------------------------------------------------------------------===//
-find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
+find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX})
if (NOT ${hsa-runtime64_FOUND})
message(STATUS "Not building amdgpu-arch: hsa-runtime64 not found")
return()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109885.372936.patch
Type: text/x-patch
Size: 2459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210916/bf86e84b/attachment-0001.bin>
More information about the Openmp-commits
mailing list