summaryrefslogtreecommitdiffstats
path: root/amd/packages/patches/rocm-bandwidth-test-reorg.patch
blob: 2186f62d6ed2a80c110c08dc30165146f7f46231 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
hsa-runtime64 is provided through rocr-runtime; this patch removes
CMake paths that tries to resolve hsa-runtime64 using opt/rocm.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a2172e7..762acfd 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,41 +134,6 @@ include(utils)
 # This scheme could fail when using older builds of ROCm. In such a case the
 # build system relies on user defined locations to find header and library files
 find_package(hsa-runtime64 PATHS /opt/rocm )
-if(${hsa-runtime64_FOUND})
-  # hsa-runtime config files will provide the include path via INSTALL_INTERFACE
-  message("hsa-runtime64 found @  ${hsa-runtime64_DIR} ")
-  set(RBT_HSA_VERSION_MAJ ${hsa-runtime64_VERSION_MAJOR} )
-  set(RBT_HSA_VERSION_MIN ${hsa-runtime64_VERSION_MINOR} )
-  set(RBT_HSA_VERSION_PATCH ${hsa-runtime64_VERSION_PATCH} )
-  # With file reorg changes
-  # Actual header files  /opt/rocm-ver/include/hsa/
-  # Wrapper header file  /opt/rocm-ver/hsa/include/hsa/
-  # Rocm 5.3.0 will have Hsa file reorg changes. Corresponding Hsa package version is 1056300
-  # If hsa package version greater than or equal to file reorg version,use hsa/hsa.h else use hsa.h
-  math(EXPR RBT_HSA_VERSION_FILEREORG "1056300")
-  add_compile_options(-DRBT_HSA_VERSION_FILEREORG=${RBT_HSA_VERSION_FILEREORG})
-
-  if( (RBT_HSA_VERSION_MAJ GREATER 999) OR (RBT_HSA_VERSION_MIN GREATER 999) )
-    # Build will fail ,if package version is invalid
-    message(FATAL_ERROR "RBT hsa-runtime64: Too big HSA runtime version number(s)" )
-  else() # if valid hsa  package version
-     # find the hsa package version and set flat version
-    math(EXPR RBT_HSA_VERSION_FLAT  "(${RBT_HSA_VERSION_MAJ}*1000000+${RBT_HSA_VERSION_MIN}*1000+${RBT_HSA_VERSION_PATCH})" )
-    add_compile_options(-DRBT_HSA_VERSION_FLAT=${RBT_HSA_VERSION_FLAT})
-  endif()
-else()
-  message("find_package did NOT find hsa-runtime64, finding it the OLD Way")
-  message("Looking for header files in ${ROCR_INC_DIR}")
-  message("Looking for library files in ${ROCR_LIB_DIR}")
-
-  # Search for ROCr header file in user defined locations
-  # Since the search is for hsa/hsa.h and the default include is "hsa/hsa.h", this will support all version of rocm
-  find_path(ROCR_HDR hsa/hsa.h PATHS ${ROCR_INC_DIR} "/opt/rocm" PATH_SUFFIXES include REQUIRED)
-  INCLUDE_DIRECTORIES(${ROCR_HDR})
-
-  # Search for ROCr library file in user defined locations
-  find_library(ROCR_LIB ${CORE_RUNTIME_TARGET} PATHS ${ROCR_LIB_DIR} "/opt/rocm" PATH_SUFFIXES lib lib64 REQUIRED)
-endif()
 
 #
 # Set the package version for the test. It is critical that this