File hipBLASLt-fix-tensilelite.patch of Package hipblaslt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d057911..37ad430 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,7 +76,7 @@ if(POLICY CMP0066)
 endif()
 
 # Force library install path to lib (CentOS 7 defaults to lib64)
-set(CMAKE_INSTALL_LIBDIR "lib" CACHE INTERNAL "Installation directory for libraries" FORCE)
+#set(CMAKE_INSTALL_LIBDIR "lib" CACHE INTERNAL "Installation directory for libraries" FORCE)
 
 
 # Build options
@@ -191,15 +191,15 @@ else()
       set( Tensile_ROOT "${CMAKE_BINARY_DIR}/virtualenv/Lib/site-packages/Tensile" )
     endif()
 
-    include(virtualenv)
-    if (Tensile_TEST_LOCAL_PATH)
-      virtualenv_install(${Tensile_TEST_LOCAL_PATH})
-      message (STATUS "using local Tensile from ${Tensile_TEST_LOCAL_PATH}, copied to ${Tensile_ROOT}")
-    else()
-      virtualenv_install(${CMAKE_SOURCE_DIR}/tensilelite)
-    endif()
-    message(STATUS "Adding ${VIRTUALENV_HOME_DIR} to CMAKE_PREFIX_PATH")
-    list(APPEND CMAKE_PREFIX_PATH ${VIRTUALENV_HOME_DIR})
+    #include(virtualenv)
+    #if (Tensile_TEST_LOCAL_PATH)
+      #virtualenv_install(${Tensile_TEST_LOCAL_PATH})
+      #message (STATUS "using local Tensile from ${Tensile_TEST_LOCAL_PATH}, copied to ${Tensile_ROOT}")
+    #else()
+    #  virtualenv_install(${CMAKE_SOURCE_DIR}/tensilelite)
+    #endif()
+    #message(STATUS "Adding ${VIRTUALENV_HOME_DIR} to CMAKE_PREFIX_PATH")
+    #list(APPEND CMAKE_PREFIX_PATH ${VIRTUALENV_HOME_DIR})
     if (TENSILE_VERSION)
       find_package(Tensile ${TENSILE_VERSION} EXACT REQUIRED HIP LLVM OpenMP PATHS "${INSTALLED_TENSILE_PATH}")
     else()
diff --git a/tensilelite/Tensile/Common.py b/tensilelite/Tensile/Common.py
index 7e5a74d..63cead9 100644
--- a/tensilelite/Tensile/Common.py
+++ b/tensilelite/Tensile/Common.py
@@ -1501,7 +1501,7 @@ def assignGlobalParameters( config ):
     else:
       print2(" %24s: %8s (unspecified)" % (key, defaultValue))
 
-  globalParameters["ROCmPath"] = "/opt/rocm"
+  globalParameters["ROCmPath"] = "/usr"
   if "ROCM_PATH" in os.environ:
     globalParameters["ROCmPath"] = os.environ.get("ROCM_PATH")
   if "TENSILE_ROCM_PATH" in os.environ:
@@ -1529,12 +1529,12 @@ def assignGlobalParameters( config ):
     if os.name == "nt":
       globalParameters["AssemblerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang++.exe")
     else:
-      globalParameters["AssemblerPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "clang++")
+      globalParameters["AssemblerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang++-rocm")
 
   globalParameters["ROCmSMIPath"] = locateExe(globalParameters["ROCmBinPath"], "rocm-smi")
-  globalParameters["ROCmLdPath"]  = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "ld.lld")
+  globalParameters["ROCmLdPath"]  = locateExe(globalParameters["ROCmBinPath"], "ld.lld-rocm")
 
-  globalParameters["ExtractKernelPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "hip/bin"), "extractkernel")
+  globalParameters["ExtractKernelPath"] = locateExe(globalParameters["ROCmBinPath"], "extractkernel")
 
   if "TENSILE_ROCM_OFFLOAD_BUNDLER_PATH" in os.environ:
     globalParameters["ClangOffloadBundlerPath"] = os.environ.get("TENSILE_ROCM_OFFLOAD_BUNDLER_PATH")
@@ -1542,7 +1542,7 @@ def assignGlobalParameters( config ):
     if os.name == "nt":
       globalParameters["ClangOffloadBundlerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang-offload-bundler.exe")
     else:
-      globalParameters["ClangOffloadBundlerPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "clang-offload-bundler")
+      globalParameters["ClangOffloadBundlerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang-offload-bundler-rocm")
 
   if "ROCmAgentEnumeratorPath" in config:
     globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
diff --git a/tensilelite/Tensile/Ops/gen_assembly.sh b/tensilelite/Tensile/Ops/gen_assembly.sh
index 0b21b6c..d8a7713 100755
--- a/tensilelite/Tensile/Ops/gen_assembly.sh
+++ b/tensilelite/Tensile/Ops/gen_assembly.sh
@@ -25,17 +25,17 @@
 
 archStr=$1
 dst=$2
-venv=$3
-build_id_kind=$4
+#venv=$3
+build_id_kind=$3
 
-rocm_path=/opt/rocm
-if ! [ -z ${ROCM_PATH+x} ]; then
-    rocm_path=${ROCM_PATH}
-fi
+# rocm_path=/opt/rocm
+# if ! [ -z ${ROCM_PATH+x} ]; then
+#     rocm_path=${ROCM_PATH}
+# fi
 
-toolchain=${rocm_path}/llvm/bin/clang++
+toolchain=clang++-rocm
 
-. ${venv}/bin/activate
+#. ${venv}/bin/activate
 
 IFS=';' read -r -a archs <<< "$archStr"
 
@@ -77,4 +77,4 @@ for arch in "${archs[@]}"; do
     python3 ./ExtOpCreateLibrary.py --src=$dst --co=$dst/extop_$arch.co --output=$dst --arch=$arch
 done
 
-deactivate
+#deactivate
openSUSE Build Service is sponsored by