public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-libs/rocBLAS/files/, sci-libs/rocBLAS/
@ 2021-02-06 16:19 Benda XU
  0 siblings, 0 replies; 2+ messages in thread
From: Benda XU @ 2021-02-06 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     d0adb875160c06a460f49d028adf6eed32646ae5
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  6 16:18:10 2021 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat Feb  6 16:19:49 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=d0adb875

sci-libs/rocBLAS: depend on Tensile-4.0.0-r1 and newer.

clean up the ebuild.

Bug: https://github.com/justxi/rocm/issues/133
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 .../files/Tensile-4.0.0-locate-commands.patch      | 32 +++++++++
 sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild           | 76 ++++++++++++++++++++++
 2 files changed, 108 insertions(+)

diff --git a/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch b/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch
new file mode 100644
index 000000000..461a736a2
--- /dev/null
+++ b/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch
@@ -0,0 +1,32 @@
+Index: Tensile-rocm-4.0.0/Tensile/Common.py
+===================================================================
+--- Tensile-rocm-4.0.0.orig/Tensile/Common.py
++++ Tensile-rocm-4.0.0/Tensile/Common.py
+@@ -1521,14 +1521,14 @@ def assignGlobalParameters( config ):
+       print2(" %24s: %8s (unspecified)" % (key, defaultValue))
+ 
+   # ROCm Agent Enumerator Path
+-  globalParameters["ROCmAgentEnumeratorPath"] = locateExe("/opt/rocm/bin", "rocm_agent_enumerator")
++  globalParameters["ROCmAgentEnumeratorPath"] = locateExe("", "rocm_agent_enumerator")
+   if "CxxCompiler" in config:
+     globalParameters["CxxCompiler"] = config["CxxCompiler"]
+ 
+   if "TENSILE_ROCM_ASSEMBLER_PATH" in os.environ:
+     globalParameters["AssemblerPath"] = os.environ.get("TENSILE_ROCM_ASSEMBLER_PATH")
+   elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hipcc":
+-    globalParameters["AssemblerPath"] = locateExe("/opt/rocm/llvm/bin", "clang++")
++    globalParameters["AssemblerPath"] = locateExe("", "clang++")
+   elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hcc":
+     globalParameters["AssemblerPath"] = locateExe("/opt/rocm/bin", "hcc")
+ 
+@@ -1536,8 +1536,8 @@ def assignGlobalParameters( config ):
+   if globalParameters["CxxCompiler"] == "hcc":
+     globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/bin", "extractkernel")
+   else:
+-    globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/hip/bin", "extractkernel")
+-    globalParameters["ClangOffloadBundlerPath"] = locateExe("/opt/rocm/llvm/bin", "clang-offload-bundler")
++    globalParameters["ExtractKernelPath"] = locateExe("", "extractkernel")
++    globalParameters["ClangOffloadBundlerPath"] = locateExe("", "clang-offload-bundler")
+ 
+   if "ROCmAgentEnumeratorPath" in config:
+     globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]

diff --git a/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild b/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
new file mode 100644
index 000000000..ba8f4c0e6
--- /dev/null
+++ b/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="AMD's library for BLAS on ROCm."
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${PN}-${PV}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0"
+
+RDEPEND="=dev-util/hip-$(ver_cut 1-2)*"
+DEPEND="${RDEPEND}
+	dev-perl/File-Which
+	dev-libs/msgpack
+	dev-util/cmake
+	dev-util/rocm-cmake
+	>=dev-util/Tensile-4.0.0-r1
+	"
+
+# stripped library is not working
+RESTRICT="strip"
+
+S="${WORKDIR}"/${PN}-rocm-${PV}
+
+rocBLAS_V="0.1"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.0.0-use-system-tensile.patch )
+
+src_prepare() {
+	eapply_user
+
+	sed -e "/PREFIX rocblas/d" \
+		-e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
+		-e "s:rocblas/include:include/rocblas:" \
+		-e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
+		-e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# allow acces to hardware
+	addwrite /dev/kfd
+	addwrite /dev/dri/
+	addwrite /dev/random
+
+	export PATH="${EPREFIX}/usr/lib/llvm/roc/bin:${PATH}"
+
+	local mycmakeargs=(
+		-DTensile_LOGIC="asm_full"
+		-DTensile_COMPILER="hipcc"
+		-DTensile_ARCHITECTURE="all"
+		-DTensile_LIBRARY_FORMAT="msgpack"
+		-DTensile_CODE_OBJECT_VERSION="V3"
+		-DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
+		-DBUILD_WITH_TENSILE=ON
+		-DBUILD_WITH_TENSILE_HOST=ON
+		-DCMAKE_CXX_FLAGS="--rocm-path=${EPREFIX}/usr"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
+		-DBUILD_TESTING=OFF
+		-DBUILD_CLIENTS_SAMPLES=OFF
+		-DBUILD_CLIENTS_TESTS=OFF
+		-DBUILD_CLIENTS_BENCHMARKS=OFF
+	)
+
+	CXX="hipcc" cmake_src_configure
+
+	# do not rerun cmake and the build process in src_install
+	sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-libs/rocBLAS/files/, sci-libs/rocBLAS/
@ 2021-08-27  7:33 Benda XU
  0 siblings, 0 replies; 2+ messages in thread
From: Benda XU @ 2021-08-27  7:33 UTC (permalink / raw
  To: gentoo-commits

commit:     3e457521cda2179e533d4f582134b67d972653c9
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 27 07:32:13 2021 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Fri Aug 27 07:33:14 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3e457521

sci-libs/rocBLAS: landed to ::gentoo.

Bug: https://bugs.gentoo.org/732952
Bug: https://bugs.gentoo.org/804181
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 .../files/Tensile-4.0.0-locate-commands.patch      |  32 ------
 .../files/Tensile-4.1.0-output-EnabledISA.patch    |  65 -----------
 .../files/Tensile-4.1.0-output-commands.patch      |  36 -------
 .../files/rocBLAS-4.0.0-use-system-tensile.patch   |  30 ------
 .../files/rocBLAS-4.1.0-fix-Ninja-build.patch      |  24 -----
 .../rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch   |  25 -----
 .../files/rocBLAS-4.1.0-link-system-blas.patch     |  42 --------
 sci-libs/rocBLAS/metadata.xml                      |  15 ---
 sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild           |  88 ---------------
 sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild           |  76 -------------
 sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild              | 120 ---------------------
 11 files changed, 553 deletions(-)

diff --git a/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch b/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch
deleted file mode 100644
index 461a736a2..000000000
--- a/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: Tensile-rocm-4.0.0/Tensile/Common.py
-===================================================================
---- Tensile-rocm-4.0.0.orig/Tensile/Common.py
-+++ Tensile-rocm-4.0.0/Tensile/Common.py
-@@ -1521,14 +1521,14 @@ def assignGlobalParameters( config ):
-       print2(" %24s: %8s (unspecified)" % (key, defaultValue))
- 
-   # ROCm Agent Enumerator Path
--  globalParameters["ROCmAgentEnumeratorPath"] = locateExe("/opt/rocm/bin", "rocm_agent_enumerator")
-+  globalParameters["ROCmAgentEnumeratorPath"] = locateExe("", "rocm_agent_enumerator")
-   if "CxxCompiler" in config:
-     globalParameters["CxxCompiler"] = config["CxxCompiler"]
- 
-   if "TENSILE_ROCM_ASSEMBLER_PATH" in os.environ:
-     globalParameters["AssemblerPath"] = os.environ.get("TENSILE_ROCM_ASSEMBLER_PATH")
-   elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hipcc":
--    globalParameters["AssemblerPath"] = locateExe("/opt/rocm/llvm/bin", "clang++")
-+    globalParameters["AssemblerPath"] = locateExe("", "clang++")
-   elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hcc":
-     globalParameters["AssemblerPath"] = locateExe("/opt/rocm/bin", "hcc")
- 
-@@ -1536,8 +1536,8 @@ def assignGlobalParameters( config ):
-   if globalParameters["CxxCompiler"] == "hcc":
-     globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/bin", "extractkernel")
-   else:
--    globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/hip/bin", "extractkernel")
--    globalParameters["ClangOffloadBundlerPath"] = locateExe("/opt/rocm/llvm/bin", "clang-offload-bundler")
-+    globalParameters["ExtractKernelPath"] = locateExe("", "extractkernel")
-+    globalParameters["ClangOffloadBundlerPath"] = locateExe("", "clang-offload-bundler")
- 
-   if "ROCmAgentEnumeratorPath" in config:
-     globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]

diff --git a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-EnabledISA.patch b/sci-libs/rocBLAS/files/Tensile-4.1.0-output-EnabledISA.patch
deleted file mode 100644
index 047da78c6..000000000
--- a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-EnabledISA.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Add a parameter called EnabledISA (list) with empty default value. If empty, auto detect supported GPU ISA
-
-kernels for ISA in EnabledISA will be generated and compiled, then merged in to codeobjects
-
---- Tensile-rocm-4.1.0/Tensile/Common.py
-+++ Tensile-rocm-4.1.0/Tensile/Common.py
-@@ -209,6 +209,7 @@ globalParameters["ClientExecutionLockPat
- 
- # internal, i.e., gets set during startup
- globalParameters["CurrentISA"] = (0,0,0)
-+globalParameters["EnabledISA"] = []
- globalParameters["ROCmAgentEnumeratorPath"] = None      # /opt/rocm/bin/rocm_agent_enumerator
- globalParameters["ROCmSMIPath"] = None                  # /opt/rocm/bin/rocm-smi
- globalParameters["AssemblerPath"] = None                # /opt/rocm/hip/bin/hipcc
-@@ -1644,6 +1645,7 @@ def assignGlobalParameters( config ):
-     globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
- 
-   # read current gfx version
-+  auto_detect_ISA = globalParameters["EnabledISA"] == []
-   if os.name != "nt" and globalParameters["CurrentISA"] == (0,0,0) and globalParameters["ROCmAgentEnumeratorPath"]:
-     process = Popen([globalParameters["ROCmAgentEnumeratorPath"], "-t", "GPU"], stdout=PIPE)
-     line = process.stdout.readline().decode()
-@@ -1653,7 +1655,9 @@ def assignGlobalParameters( config ):
-         if arch in globalParameters["SupportedISA"]:
-           print1("# Detected local GPU with ISA: gfx" + ''.join(map(str,arch)))
-           globalParameters["CurrentISA"] = arch
-+          if auto_detect_ISA : globalParameters["EnabledISA"].append(arch)
-         line = process.stdout.readline().decode()
-+    print1("# kernels for " + ', '.join('gfx' + ''.join(map(str,arch)) for arch in globalParameters["EnabledISA"]) + " will be generated and compiled.")
-     if globalParameters["CurrentISA"] == (0,0,0):
-       printWarning("Did not detect SupportedISA: %s; cannot benchmark assembly kernels." % globalParameters["SupportedISA"])
-     if process.returncode:
-
---- Tensile-rocm-4.1.0/Tensile/TensileCreateLibrary.py
-+++ Tensile-rocm-4.1.0/Tensile/TensileCreateLibrary.py
-@@ -169,7 +169,7 @@ def buildSourceCodeObjectFile(CxxCompile
- 
-       archs = []
-       cmdlineArchs = []
--      for arch in globalParameters['SupportedISA']:
-+      for arch in globalParameters['EnabledISA']:
-         if isSupported(arch):
-           if (arch == (9,0,6) or arch == (9,0,8)):
-             archs += ['gfx'+''.join(map(str,arch))+'-xnack-']
-@@ -1067,7 +1067,7 @@ def buildObjectFileNames(solutionWriter,
-                if isSupported(arch)]
-   elif (cxxCompiler == 'hipcc'):
-     sourceArchs = []
--    for arch in globalParameters['SupportedISA']:
-+    for arch in globalParameters['EnabledISA']:
-       if isSupported(arch):
-         if (arch == (9,0,6) or arch == (9,0,8)):
-           sourceArchs += ['gfx'+''.join(map(str,arch))+'-xnack-']
-@@ -1249,8 +1249,9 @@ def generateKernelObjectsFromSolutions(s
-   for solution in solutions:
-     solutionKernels = solution.getKernels()
-     for kernel in solutionKernels:
--      if kernel not in kernels:
--        kernels.append(kernel)
-+      if kernel["ISA"] in globalParameters["EnabledISA"] or kernel["KernelLanguage"] == "Source" :
-+        if kernel not in kernels:
-+          kernels.append(kernel)
-     solutionHelperKernels = solution.getHelperKernelObjects()
-     for ko in solutionHelperKernels:
-       kname = ko.getKernelName()

diff --git a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-commands.patch b/sci-libs/rocBLAS/files/Tensile-4.1.0-output-commands.patch
deleted file mode 100644
index 152142d59..000000000
--- a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-commands.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Print Code objects generation commands
-
-Cancel running dpkg to check existence of hip
-
---- Tensile-rocm-4.1.0/Tensile/Common.py
-+++ Tensile-rocm-4.1.0/Tensile/Common.py
-@@ -175,7 +175,7 @@ globalParameters["PrintTensorD"] = 0
- globalParameters["PrintTensorRef"] = 0          # Print reference tensor.  0x1=after init; 0x2=after copy-back; 0x3=both
- globalParameters["PrintIndexAssignments"] = 0      # Print the tensor index assignment info
- globalParameters["PrintWinnersOnly"] = False      # Only print the solutions which become the fastest
--globalParameters["PrintCodeCommands"] = False  # print the commands used to generate the code objects (asm,link,hip-clang, etc)
-+globalParameters["PrintCodeCommands"] = True  # print the commands used to generate the code objects (asm,link,hip-clang, etc)
- 
- # TODO - remove this when NewClient is mainstream
- globalParameters["OldClientSourceTmp"] = True      # Use an intermediate sourceTmp dir to detect file changes and minimize rebuilds on old client
-@@ -1680,20 +1680,6 @@ def assignGlobalParameters( config ):
-   # Due to platform.linux_distribution() being deprecated, just try to run dpkg regardless.
-   # The alternative would be to install the `distro` package.
-   # See https://docs.python.org/3.7/library/platform.html#platform.linux_distribution
--  try:
--    if globalParameters["CxxCompiler"] == "hipcc":
--      output = subprocess.run(["dpkg", "-l", "hip-rocclr"], check=True, stdout=subprocess.PIPE).stdout.decode()
--    elif globalParameters["CxxCompiler"] == "hcc":
--      output = subprocess.run(["dpkg", "-l", "hcc"], check=True, stdout=subprocess.PIPE).stdout.decode()
--
--    for line in output.split('\n'):
--      if 'hipcc' in line:
--        globalParameters['HipClangVersion'] = line.split()[2]
--      elif 'hcc' in line:
--        globalParameters['HccVersion'] = line.split()[2]
--
--  except (subprocess.CalledProcessError, OSError) as e:
--      printWarning("Error: {} looking for package {}: {}".format('dpkg', 'hip-rocclr', e))
- 
-   for key in config:
-     value = config[key]

diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.0.0-use-system-tensile.patch b/sci-libs/rocBLAS/files/rocBLAS-4.0.0-use-system-tensile.patch
deleted file mode 100644
index 3b8e44a99..000000000
--- a/sci-libs/rocBLAS/files/rocBLAS-4.0.0-use-system-tensile.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --color -uprN rocBLAS-rocm-4.0.0/CMakeLists.txt new/CMakeLists.txt
---- rocBLAS-rocm-4.0.0/CMakeLists.txt	2020-11-11 00:56:04.000000000 +0800
-+++ new/CMakeLists.txt	2021-01-20 15:23:09.570222990 +0800
-@@ -208,25 +208,7 @@ if( BUILD_WITH_TENSILE )
-     option(TENSILE_USE_MSGPACK   "Use msgpack for parsing config files." ON)
-   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()
--    # Use the virtual-env setup and download package from specified repot:
--    set( tensile_fork "ROCmSoftwarePlatform" CACHE STRING "Tensile fork to use" )
--    file (STRINGS "tensile_tag.txt" read_tensile_tag)
--    set( tensile_tag ${read_tensile_tag} CACHE STRING "Tensile tag to download" )
--    virtualenv_install("git+https://github.com/${tensile_fork}/Tensile.git@${tensile_tag}")
--    message (STATUS "using GIT Tensile fork=${tensile_fork} from branch=${tensile_tag}")
--  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()
--    find_package(Tensile 4.24.0 EXACT REQUIRED HIP LLVM OpenMP PATHS "${INSTALLED_TENSILE_PATH}")
--  endif()
-+  find_package(Tensile 4.24.0 EXACT REQUIRED HIP LLVM OpenMP)
- endif()
- 
- # Find HCC/HIP dependencies

diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-Ninja-build.patch b/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-Ninja-build.patch
deleted file mode 100644
index 3b9c3efdd..000000000
--- a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-Ninja-build.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://github.com/ROCmSoftwarePlatform/rocBLAS/commit/b90e6ef22166b72e73a830aa83e9bbe342d5e676
-
---- rocBLAS-rocm-4.1.0/library/src/CMakeLists.txt
-+++ rocBLAS-rocm-4.1.0/library/src/CMakeLists.txt
-@@ -447,10 +447,18 @@ set_target_properties( rocblas PROPERTIE
- generate_export_header( rocblas EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/internal/rocblas-export.h )
- 
- # generate header with prototypes for export reuse
-+file( GLOB rocblas_prototype_inputs
-+  LIST_DIRECTORIES OFF
-+  CONFIGURE_DEPENDS
-+  ${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/*.hpp
-+  ${CMAKE_CURRENT_SOURCE_DIR}/blas3/*.hpp
-+  ${CMAKE_CURRENT_SOURCE_DIR}/blas2/*.hpp
-+  ${CMAKE_CURRENT_SOURCE_DIR}/blas1/*.hpp
-+)
- set( ROCBLAS_PROTO_TEMPLATES "${PROJECT_BINARY_DIR}/include/internal/rocblas-exported-proto.hpp" )
- add_custom_command(OUTPUT ${ROCBLAS_PROTO_TEMPLATES}
-   COMMAND python3 template-proto.py ${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas3/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas2/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas1/*.hpp > ${ROCBLAS_PROTO_TEMPLATES}
--  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas3/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas2/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas1/*.hpp
-+  DEPENDS ${rocblas_prototype_inputs}
-   COMMENT "Generating prototypes from ${CMAKE_CURRENT_SOURCE_DIR}."
-   WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-   )

diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch b/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch
deleted file mode 100644
index a4d9f0bab..000000000
--- a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://sourceware.org/glibc/wiki/Release/2.32#Deprectation_sys_siglist.2C__sys_siglist.2C_sys_sigabbrev
-
---- rocBLAS-rocm-4.1.0/clients/gtest/rocblas_test.cpp
-+++ rocBLAS-rocm-4.1.0/clients/gtest/rocblas_test.cpp
-@@ -173,7 +173,7 @@ void catch_signals_and_exceptions_as_fai
-     // Set up the return point, and handle siglongjmp returning back to here
-     if(sigsetjmp(t_handler.sigjmp_buf, true))
-     {
--        FAIL() << "Received " << sys_siglist[t_handler.signal] << " signal";
-+        FAIL() << "Received " << strsignal(t_handler.signal) << " signal";
-     }
-     else
-     {
-
---- rocBLAS-rocm-4.1.0/clients/include/utility.hpp
-+++ rocBLAS-rocm-4.1.0/clients/include/utility.hpp
-@@ -39,7 +39,7 @@
- // puts, putchar, fputs, printf, fprintf, vprintf, vfprintf: Use rocblas_cout or rocblas_cerr
- // sprintf, vsprintf: Possible buffer overflows; us snprintf or vsnprintf instead
- // strerror: Thread-unsafe; use snprintf / dprintf with %m or strerror_* alternatives
--// strsignal: Thread-unsafe; use sys_siglist[signal] instead
-+// strsignal: Thread-unsafe; use strsignal(signal) instead
- // strtok: Thread-unsafe; use strtok_r
- // gmtime, ctime, asctime, localtime: Thread-unsafe
- // tmpnam: Thread-unsafe; use mkstemp or related functions instead

diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-link-system-blas.patch b/sci-libs/rocBLAS/files/rocBLAS-4.1.0-link-system-blas.patch
deleted file mode 100644
index 082d8313f..000000000
--- a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-link-system-blas.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Link system blas libraries against rocblas-bench and rocblas-test
-
---- rocBLAS-rocm-4.1.0/clients/benchmarks/CMakeLists.txt
-+++ rocBLAS-rocm-4.1.0/clients/benchmarks/CMakeLists.txt
-@@ -83,7 +83,7 @@ if( OS_ID_rhel OR OS_ID_sles OR OS_ID_ce
-     if(LINK_BLIS)
-       target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas cblas lapack ${BLIS_LIBRARY} ${OPENMP_LIBRARY} )
-     else()
--      target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas cblas lapack ${OPENMP_LIBRARY} )
-+      target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas cblas lapack -lblas ${OPENMP_LIBRARY} )
-     endif()
- else()
-     # External header includes included as system files
-@@ -97,7 +97,7 @@ else()
-     if(LINK_BLIS)
-       target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${BLIS_LIBRARY} )
-     else()
--      target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas )
-+      target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas -lblas )
-     endif()
- endif()
- 
---- rocBLAS-rocm-4.1.0/clients/gtest/CMakeLists.txt
-+++ rocBLAS-rocm-4.1.0/clients/gtest/CMakeLists.txt
-@@ -163,7 +163,7 @@ if( OS_ID_rhel OR OS_ID_sles OR OS_ID_ce
-     if(LINK_BLIS)
-       target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${BLIS_LIBRARY} ${GTEST_LIBRARIES} ${OPENMP_LIBRARY} )
-     else()
--      target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${GTEST_LIBRARIES} ${OPENMP_LIBRARY} )
-+      target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas -lblas ${GTEST_LIBRARIES} ${OPENMP_LIBRARY} )
-     endif()
- else()
-     # External header includes included as system files
-@@ -177,7 +177,7 @@ else()
-     if(LINK_BLIS)
-       target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${BLIS_LIBRARY} ${GTEST_LIBRARIES} )
-     else()
--      target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${GTEST_LIBRARIES} )
-+      target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas -lblas ${GTEST_LIBRARIES} )
-     endif()
- endif()
- 

diff --git a/sci-libs/rocBLAS/metadata.xml b/sci-libs/rocBLAS/metadata.xml
deleted file mode 100644
index 189545382..000000000
--- a/sci-libs/rocBLAS/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
-<pkgmetadata>
-  <maintainer type="project">
-    <email>sci@gentoo.org</email>
-  </maintainer>
-  <maintainer type="person">
-    <email>gentoo@holzke.net</email>
-    <name>Wilfried Holzke</name>
-  </maintainer>
-    <use>
-        <flag name="test">Perform rocblas-test to compare the result between rocBLAS and system BLAS.</flag>
-        <flag name="benchmark">Build and install rocblas-bench.</flag>
-    </use>
-</pkgmetadata>

diff --git a/sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild b/sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild
deleted file mode 100644
index ca0fcfd8c..000000000
--- a/sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="AMD's library for BLAS on ROCm."
-HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
-SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-rocBLAS-${PV}.tar.gz"
-
-LICENSE="MIT"
-KEYWORDS="~amd64"
-SLOT="0"
-
-IUSE="debug"
-
-RDEPEND="=dev-util/hip-$(ver_cut 1-2)*"
-DEPEND="${RDEPEND}
-	dev-util/cmake
-	dev-util/rocm-cmake
-	dev-libs/msgpack
-	dev-perl/File-Which"
-
-# stripped library is not working
-RESTRICT="strip"
-
-S="${WORKDIR}/rocBLAS-rocm-${PV}"
-
-rocBLAS_V="0.1"
-
-PATCHES="${FILESDIR}/${PN}-4.0.0-use-system-tensile.patch"
-
-src_prepare() {
-	eapply_user
-
-	sed -e "/PREFIX rocblas/d" \
-		-e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
-		-e "s:rocblas/include:include/rocblas:" \
-		-e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
-		-e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# allow acces to hardware
-	addwrite /dev/kfd
-	addpredict /dev/dri/
-
-	# Compiler to use
-	export CXX="hipcc"
-
-	if use debug; then
-		buildtype="Debug"
-	else
-		buildtype="Release"
-	fi
-
-	local mycmakeargs=(
-		-DTensile_LOGIC="asm_full"
-		-DTensile_COMPILER="hipcc"
-		-DTensile_ARCHITECTURE="all"
-		-DTensile_LIBRARY_FORMAT="msgpack"
-		-DTensile_CODE_OBJECT_VERSION="V3"
-		-DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
-		-DBUILD_WITH_TENSILE=ON
-		-DBUILD_WITH_TENSILE_HOST=ON
-		-DCMAKE_BUILD_TYPE="${buildtype}"
-		-DCMAKE_CXX_FLAGS="--rocm-path=${EPREFIX}/usr"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
-		-DBUILD_TESTING=OFF
-		-DBUILD_CLIENTS_SAMPLES=OFF
-		-DBUILD_CLIENTS_TESTS=OFF
-		-DBUILD_CLIENTS_BENCHMARKS=OFF
-	)
-
-	cmake_src_configure
-
-	# do not rerun cmake and the build process in src_install
-	sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
-}
-
-src_install() {
-	cmake_src_install
-	chrpath --delete "${ED}/usr/lib64/librocblas.so.${rocBLAS_V}"
-}

diff --git a/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild b/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
deleted file mode 100644
index bb44363d3..000000000
--- a/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="AMD's library for BLAS on ROCm."
-HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
-SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${PN}-${PV}.tar.gz"
-
-LICENSE="MIT"
-KEYWORDS="~amd64"
-SLOT="0"
-
-RDEPEND="=dev-util/hip-$(ver_cut 1-2)*"
-DEPEND="${RDEPEND}
-	dev-perl/File-Which
-	dev-libs/msgpack
-	dev-util/cmake
-	dev-util/rocm-cmake
-	>=dev-util/Tensile-4.0.0-r1
-	>=sys-devel/llvm-roc-4.0.0-r2
-	"
-
-# stripped library is not working
-RESTRICT="strip"
-
-S="${WORKDIR}"/${PN}-rocm-${PV}
-
-rocBLAS_V="0.1"
-
-PATCHES=( "${FILESDIR}"/${PN}-4.0.0-use-system-tensile.patch )
-
-src_prepare() {
-	eapply_user
-
-	sed -e "/PREFIX rocblas/d" \
-		-e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
-		-e "s:rocblas/include:include/rocblas:" \
-		-e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
-		-e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# allow acces to hardware
-	addwrite /dev/kfd
-	addwrite /dev/dri/
-	addwrite /dev/random
-
-	export PATH="${EPREFIX}/usr/lib/llvm/roc/bin:${PATH}"
-
-	local mycmakeargs=(
-		-DTensile_LOGIC="asm_full"
-		-DTensile_COMPILER="hipcc"
-		-DTensile_ARCHITECTURE="all"
-		-DTensile_LIBRARY_FORMAT="msgpack"
-		-DTensile_CODE_OBJECT_VERSION="V3"
-		-DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
-		-DBUILD_WITH_TENSILE=ON
-		-DBUILD_WITH_TENSILE_HOST=ON
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
-		-DBUILD_TESTING=OFF
-		-DBUILD_CLIENTS_SAMPLES=OFF
-		-DBUILD_CLIENTS_TESTS=OFF
-		-DBUILD_CLIENTS_BENCHMARKS=OFF
-	)
-
-	CXX="hipcc" cmake_src_configure
-
-	# do not rerun cmake and the build process in src_install
-	sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
-}

diff --git a/sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild b/sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild
deleted file mode 100644
index 43867c1ef..000000000
--- a/sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9} )
-
-inherit cmake python-any-r1
-
-DESCRIPTION="AMD's library for BLAS on ROCm."
-HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
-SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${P}.tar.gz
-	https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-${PV}.tar.gz -> rocm-Tensile-${PV}.tar.gz"
-
-LICENSE="MIT"
-KEYWORDS="~amd64"
-IUSE="benchmark test"
-SLOT="0"
-
-BDEPEND="
-	dev-util/rocm-cmake
-	!dev-util/Tensile
-	$(python_gen_any_dep '
-		dev-python/msgpack[${PYTHON_USEDEP}]
-		dev-python/pyyaml[${PYTHON_USEDEP}]
-	')
-"
-
-RDEPEND="
-	=dev-util/hip-$(ver_cut 1-2)*
-	benchmark? ( virtual/blas )
-"
-
-DEPEND="${RDEPEND}
-	test? ( virtual/blas )
-"
-
-# stripped library is not working
-RESTRICT="strip !test? ( test )"
-
-python_check_deps() {
-	has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" &&
-	has_version "dev-python/msgpack[${PYTHON_USEDEP}]"
-}
-
-S="${WORKDIR}"/${PN}-rocm-${PV}
-
-PATCHES=( "${FILESDIR}"/${PN}-4.1.0-fix-Ninja-build.patch
-	"${FILESDIR}"/${PN}-4.1.0-fix-glibc-2.32-and-above.patch
-	"${FILESDIR}"/${PN}-4.1.0-link-system-blas.patch )
-
-src_prepare() {
-	eapply_user
-
-	pushd "${WORKDIR}"/Tensile-rocm-${PV} || die
-	eapply "${FILESDIR}/Tensile-4.1.0-output-commands.patch"
-	eapply "${FILESDIR}/Tensile-4.1.0-output-EnabledISA.patch"
-	popd || die
-
-	sed -e "/PREFIX rocblas/d" \
-		-e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
-		-e "s:rocblas/include:include/rocblas:" \
-		-e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
-		-e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
-
-	# Use setup.py to install Tensile rather than pip
-	sed -r -e "/pip install/s:([^ \"\(]*python) -m pip install ([^ \"\)]*):\1 setup.py install --single-version-externally-managed --root / WORKING_DIRECTORY \2:g" -i cmake/virtualenv.cmake
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# allow acces to hardware
-	addwrite /dev/kfd
-	addwrite /dev/dri/
-	addwrite /dev/random
-
-	export PATH="${EPREFIX}/usr/lib/llvm/roc/bin:${PATH}"
-
-	local mycmakeargs=(
-		-DTensile_LOGIC="asm_full"
-		-DTensile_COMPILER="hipcc"
-		-DTensile_ARCHITECTURE="all"
-		-DTensile_LIBRARY_FORMAT="msgpack"
-		-DTensile_CODE_OBJECT_VERSION="V3"
-		-DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
-		-DBUILD_WITH_TENSILE=ON
-		-DBUILD_WITH_TENSILE_HOST=ON
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
-		-DBUILD_TESTING=OFF
-		-DBUILD_CLIENTS_SAMPLES=OFF
-		-DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
-		-DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF)
-	)
-
-	CXX="hipcc" cmake_src_configure
-
-	# do not rerun cmake and the build process in src_install
-	sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
-}
-
-src_test() {
-	cd "${BUILD_DIR}/clients/staging" || die
-	ROCBLAS_TENSILE_LIBPATH="${BUILD_DIR}/Tensile/library" ./rocblas-test
-}
-
-src_install() {
-	echo "ROCBLAS_TENSILE_LIBPATH=${EPREFIX}/usr/$(get_libdir)/rocblas/library" >> 99rocblas || die
-	doenvd 99rocblas
-
-	cmake_src_install
-
-	if use benchmark; then
-		cd "${BUILD_DIR}" || die
-		dolib.so clients/librocblas_fortran_client.so
-		dobin clients/staging/rocblas-bench
-		chrpath -d "${ED}/usr/bin/rocblas-bench" || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-27  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-06 16:19 [gentoo-commits] proj/sci:master commit in: sci-libs/rocBLAS/files/, sci-libs/rocBLAS/ Benda XU
  -- strict thread matches above, loose matches on Subject: below --
2021-08-27  7:33 Benda XU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox