change the default rocm tensile library search path --- orig/library/src/tensile_host.cpp 2021-08-21 17:56:47.040481580 +0800 +++ rocBLAS-rocm-4.3.0/library/src/tensile_host.cpp 2021-08-21 17:58:46.360482372 +0800 @@ -489,34 +489,7 @@ namespace } else { -#ifndef ROCBLAS_STATIC_LIB - Dl_info info; - - // Find the location of librocblas.so - // Fall back on hard-coded path if static library or not found - // [Use a C API (rocblas_sccal) *not* defined in this file to - // avoid compile-time resolution of the function pointer; cf. - // https://man7.org/linux/man-pages/man3/dladdr.3.html "BUGS"] - - if(dladdr((void*)rocblas_sscal, &info)) - { - path = info.dli_fname; - path = std::string{dirname(&path[0])}; - } - else -#endif - { - path = "/opt/rocm/rocblas/lib"; - } - - // Find the location of the libraries - if(TestPath(path + "/../../Tensile/library")) - path += "/../../Tensile/library"; - else - path += "/library"; - - if(TestPath(path + "/" + processor)) - path += "/" + processor; + path="@GENTOO_PORTAGE_EPREFIX@/usr/lib64/rocblas/library"; } // only load modules for the current architecture