rocm: removal of deprecated <5.1 versions (#42676)
The package `aomp` is removed entirely, as it was too outdated to have non-deprecated dependencies.
This commit is contained in:
parent
2d8e0825fe
commit
de3d1e6c66
96 changed files with 481 additions and 7560 deletions
|
@ -162,23 +162,9 @@ def hip_flags(amdgpu_target):
|
|||
|
||||
# Add compiler minimum versions based on the first release where the
|
||||
# processor is included in llvm/lib/Support/TargetParser.cpp
|
||||
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx900:xnack-")
|
||||
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx906:xnack-")
|
||||
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx908:xnack-")
|
||||
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx90c")
|
||||
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a")
|
||||
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a:xnack-")
|
||||
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a:xnack+")
|
||||
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx940")
|
||||
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx941")
|
||||
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx942")
|
||||
depends_on("llvm-amdgpu@4.5.0:", when="amdgpu_target=gfx1013")
|
||||
depends_on("llvm-amdgpu@3.8.0:", when="amdgpu_target=gfx1030")
|
||||
depends_on("llvm-amdgpu@3.9.0:", when="amdgpu_target=gfx1031")
|
||||
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx1032")
|
||||
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx1033")
|
||||
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx1034")
|
||||
depends_on("llvm-amdgpu@4.5.0:", when="amdgpu_target=gfx1035")
|
||||
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx1036")
|
||||
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1100")
|
||||
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1101")
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
From eb1e1351da41a0da25aa056636932acd8a4f955f Mon Sep 17 00:00:00 2001
|
||||
From: Ethan Stewart <ethan.stewart@amd.com>
|
||||
Date: Fri, 25 Sep 2020 09:53:42 -0500
|
||||
Subject: [PATCH] Add amdgcn to devicelibs bitcode names 3.8
|
||||
|
||||
---
|
||||
clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
|
||||
index 25d3db59d44..1bb9d993bf7 100644
|
||||
--- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
|
||||
@@ -148,21 +148,21 @@ const char *AMDGCN::OpenMPLinker::constructOmpExtraCmds(
|
||||
llvm::StringRef WaveFrontSizeBC;
|
||||
std::string GFXVersion = SubArchName.drop_front(3).str();
|
||||
if (stoi(GFXVersion) < 1000)
|
||||
- WaveFrontSizeBC = "oclc_wavefrontsize64_on.bc";
|
||||
+ WaveFrontSizeBC = "oclc_wavefrontsize64_on.amdgcn.bc";
|
||||
else
|
||||
- WaveFrontSizeBC = "oclc_wavefrontsize64_off.bc";
|
||||
+ WaveFrontSizeBC = "oclc_wavefrontsize64_off.amdgcn.bc";
|
||||
|
||||
// FIXME: remove double link of hip aompextras, ockl, and WaveFrontSizeBC
|
||||
if (Args.hasArg(options::OPT_cuda_device_only))
|
||||
BCLibs.append(
|
||||
{Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
|
||||
- "hip.bc", "ockl.bc",
|
||||
+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
|
||||
std::string(WaveFrontSizeBC)});
|
||||
else {
|
||||
BCLibs.append(
|
||||
{Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
|
||||
Args.MakeArgString("libaompextras-amdgcn-" + SubArchName + ".bc"),
|
||||
- "hip.bc", "ockl.bc",
|
||||
+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
|
||||
Args.MakeArgString("libbc-hostrpc-amdgcn.a"),
|
||||
std::string(WaveFrontSizeBC)});
|
||||
|
||||
--
|
||||
2.17.1
|
|
@ -1,41 +0,0 @@
|
|||
From 2414b9faee9c264ce4b92b4d709375313df03344 Mon Sep 17 00:00:00 2001
|
||||
From: Ethan Stewart <ethan.stewart@amd.com>
|
||||
Date: Tue, 22 Sep 2020 13:39:22 -0500
|
||||
Subject: [PATCH] Add amdgcn to devicelibs bitcode names
|
||||
|
||||
---
|
||||
clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
|
||||
index cc9b4f1caba..d22609fbe62 100644
|
||||
--- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
|
||||
@@ -148,21 +148,21 @@ const char *AMDGCN::OpenMPLinker::constructOmpExtraCmds(
|
||||
llvm::StringRef WaveFrontSizeBC;
|
||||
std::string GFXVersion = SubArchName.drop_front(3).str();
|
||||
if (stoi(GFXVersion) < 1000)
|
||||
- WaveFrontSizeBC = "oclc_wavefrontsize64_on.bc";
|
||||
+ WaveFrontSizeBC = "oclc_wavefrontsize64_on.amdgcn.bc";
|
||||
else
|
||||
- WaveFrontSizeBC = "oclc_wavefrontsize64_off.bc";
|
||||
+ WaveFrontSizeBC = "oclc_wavefrontsize64_off.amdgcn.bc";
|
||||
|
||||
// FIXME: remove double link of hip aompextras, ockl, and WaveFrontSizeBC
|
||||
if (Args.hasArg(options::OPT_cuda_device_only))
|
||||
BCLibs.append(
|
||||
{Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
|
||||
- "hip.bc", "ockl.bc",
|
||||
+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
|
||||
std::string(WaveFrontSizeBC)});
|
||||
else {
|
||||
BCLibs.append(
|
||||
{Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
|
||||
Args.MakeArgString("libaompextras-amdgcn-" + SubArchName + ".bc"),
|
||||
- "hip.bc", "ockl.bc",
|
||||
+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
|
||||
Args.MakeArgString("libbc-hostrpc-amdgcn.a"),
|
||||
std::string(WaveFrontSizeBC)});
|
||||
|
||||
--
|
||||
2.17.1
|
|
@ -1,28 +0,0 @@
|
|||
From 526efe86427a4d49da38773534d84025dd4246c3 Mon Sep 17 00:00:00 2001
|
||||
From: Ethan Stewart <ethan.stewart@amd.com>
|
||||
Date: Tue, 10 Nov 2020 15:32:59 -0600
|
||||
Subject: [PATCH] Add cmake option for copying source for debugging.
|
||||
|
||||
---
|
||||
openmp/CMakeLists.txt | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
|
||||
index a86e83c50212..51962b561a3b 100644
|
||||
--- a/openmp/CMakeLists.txt
|
||||
+++ b/openmp/CMakeLists.txt
|
||||
@@ -103,3 +103,11 @@ endif()
|
||||
|
||||
# Now that we have seen all testsuites, create the check-openmp target.
|
||||
construct_check_openmp_target()
|
||||
+
|
||||
+option(DEBUG_COPY_SOURCE "Enable source code copy for openmp debug build."
|
||||
+ ${ENABLE_SOURCE_COPY})
|
||||
+if (${ENABLE_SOURCE_COPY})
|
||||
+ install(DIRECTORY runtime/src DESTINATION ${OPENMP_INSTALL_LIBDIR}/src/openmp/runtime)
|
||||
+ install(DIRECTORY libomptarget/src libomptarget/plugins DESTINATION ${OPENMP_INSTALL_LIBDIR}/src/openmp/libomptarget)
|
||||
+ install(DIRECTORY libompd/src DESTINATION ${OPENMP_INSTALL_LIBDIR}/src/openmp/libompd)
|
||||
+endif()
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,528 +0,0 @@
|
|||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
tools_url = "https://github.com/ROCm"
|
||||
compute_url = "https://github.com/ROCm"
|
||||
|
||||
|
||||
aomp = [
|
||||
"e4526489833896bbc47ba865e0d115fab278ce269789a8c99a97f444595f5f6a",
|
||||
"970374c3acb9dda8b9a17d7a579dbaab48fac731db8fdce566a65abee37e5ed3",
|
||||
"86f90d6505eccdb2840069cadf57f7111d4685653c4974cf65fb22b172e55478",
|
||||
"14fc6867af0b17e3bff8cb42cb36f509c95a29b7a933a106bf6778de21f6c123",
|
||||
"ce29cead5391a4a13f2c567e2e059de9291888d24985460725e43a91b740be7a",
|
||||
]
|
||||
|
||||
devlib = [
|
||||
"dce3a4ba672c4a2da4c2260ee4dc96ff6dd51877f5e7e1993cb107372a35a378",
|
||||
"b3a114180bf184b3b829c356067bc6a98021d52c1c6f9db6bc57272ebafc5f1d",
|
||||
"e82cc9a8eb7d92de02cabb856583e28f17a05c8cf9c97aec5275608ef1a38574",
|
||||
"c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7",
|
||||
"bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc",
|
||||
]
|
||||
|
||||
llvm = [
|
||||
"b4fd7305dc57887eec17cce77bbf42215db46a4a3d14d8e517ab92f4e200b29d",
|
||||
"89b967de5e79f6df7c62fdc12529671fa30989ae7b634d5a7c7996629ec1140e",
|
||||
"98deabedb6cb3067ee960a643099631902507f236e4d9dc65b3e0f8d659eb55c",
|
||||
"f0a0b9fec0626878340a15742e73a56f155090011716461edcb069dcf05e6b30",
|
||||
"3ff18a8bd31d5b55232327e574dfa3556cf26787e105d0ba99411c5687325a8d",
|
||||
]
|
||||
|
||||
flang = [
|
||||
"cc27f8bfb49257b7a4f0b03f4ba5e06a28dcb6c337065c4201b6075dd2d5bc48",
|
||||
"1fe07a0da20eb66a2a2aa8d354bf95c6f216ec38cc4a051e98041e0d13c34b36",
|
||||
"54cc6a9706dba6d7808258632ed40fa6493838edb309709d3b25e0f9b02507f8",
|
||||
"43d57bcc87fab092ac242e36da62588a87b6fa91f9e81fdb330159497afdecb3",
|
||||
"81674bf3c9d8fd9b16fb3e5c66a870537c25ff8302fc1b162ab9e95944167163",
|
||||
]
|
||||
|
||||
extras = [
|
||||
"5dbf27f58b8114318208b97ba99a90483b78eebbcad4117cac6881441977e855",
|
||||
"adaf7670b2497ff3ac09636e0dd30f666a5a5b742ecdcb8551d722102dcfbd85",
|
||||
"4460a4f4b03022947f536221483e85dcd9b07064a54516ec103a1939c3f587b5",
|
||||
"014fca1fba54997c6db0e84822df274fb6807698b6856da4f737f38f10ab0e5d",
|
||||
"ee146cff4b9ee7aae90d7bb1d6b4957839232be0e7dab1865e0ae39832f8f795",
|
||||
]
|
||||
|
||||
# Used only for 3.5.0
|
||||
hip = ["86eb7749ff6f6c5f6851cd6c528504d42f9286967324a50dd0dd54a6a74cacc7"]
|
||||
|
||||
vdi = ["b21866c7c23dc536356db139b88b6beb3c97f58658836974a7fc167feb31ad7f"]
|
||||
|
||||
opencl = ["8963fcd5a167583b3db8b94363778d4df4593bfce8141e1d3c32a59fb64a0cf6"]
|
||||
|
||||
versions = ["3.5.0", "3.7.0", "3.8.0", "3.9.0", "3.10.0"]
|
||||
versions_dict = dict() # type: Dict[str, Dict[str, str]]
|
||||
hashes = [aomp, devlib, llvm, flang, extras]
|
||||
hashes_35 = [aomp, devlib, llvm, flang, extras, hip, vdi, opencl]
|
||||
components = ["aomp", "devlib", "llvm", "flang", "extras"]
|
||||
components_35 = ["aomp", "devlib", "llvm", "flang", "extras", "hip", "vdi", "opencl"]
|
||||
|
||||
for outer_index, item in enumerate(versions):
|
||||
if item == "3.5.0":
|
||||
use_components = components_35
|
||||
use_hashes = hashes_35
|
||||
else:
|
||||
use_components = components
|
||||
use_hashes = hashes
|
||||
for inner_index, component in enumerate(use_hashes):
|
||||
versions_dict.setdefault(item, {})[use_components[inner_index]] = use_hashes[inner_index][
|
||||
outer_index
|
||||
]
|
||||
|
||||
|
||||
class Aomp(Package):
|
||||
"""llvm openmp compiler from AMD."""
|
||||
|
||||
homepage = tools_url + "/aomp"
|
||||
url = tools_url + "/aomp/archive/rocm-3.10.0.tar.gz"
|
||||
|
||||
maintainers("srekolam", "arjun-raj-kuppala", "estewart08")
|
||||
|
||||
tags = ["e4s"]
|
||||
|
||||
version("3.10.0", sha256=versions_dict["3.10.0"]["aomp"])
|
||||
version("3.9.0", sha256=versions_dict["3.9.0"]["aomp"])
|
||||
|
||||
# Cmake above 3.18 would fail the build on 3.5.0
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("cmake@3:3.17", when="@3.5.0", type="build")
|
||||
|
||||
depends_on("python@3:", type="build", when="@3.9.0:")
|
||||
depends_on("py-setuptools", when="@3.9.0:", type="build")
|
||||
|
||||
depends_on("gl@4.5:", type=("build", "link"))
|
||||
depends_on("py-pip", when="@3.8.0:", type="build")
|
||||
depends_on("py-wheel", when="@3.8.0:", type=("build", "run"))
|
||||
depends_on("perl-data-dumper", type="build")
|
||||
depends_on("awk", type="build")
|
||||
depends_on("elfutils", type=("build", "link"))
|
||||
depends_on("libffi", type=("build", "link"))
|
||||
|
||||
for ver in ["3.5.0", "3.7.0", "3.8.0", "3.9.0", "3.10.0"]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("comgr@" + ver, type="build", when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("rocm-device-libs@" + ver, when="@" + ver)
|
||||
|
||||
if ver != "3.5.0":
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("hip-rocclr@" + ver, when="@" + ver)
|
||||
|
||||
if ver == "3.9.0" or ver == "3.10.0":
|
||||
depends_on("rocm-gdb@" + ver, when="@" + ver)
|
||||
|
||||
resource(
|
||||
name="rocm-device-libs",
|
||||
url=compute_url + "/ROCm-Device-Libs/archive/rocm-" + ver + ".tar.gz",
|
||||
sha256=versions_dict[ver]["devlib"],
|
||||
expand=True,
|
||||
destination="aomp-dir",
|
||||
placement="rocm-device-libs",
|
||||
when="@" + ver,
|
||||
)
|
||||
|
||||
resource(
|
||||
name="amd-llvm-project",
|
||||
url=tools_url + "/amd-llvm-project/archive/rocm-" + ver + ".tar.gz",
|
||||
sha256=versions_dict[ver]["llvm"],
|
||||
expand=True,
|
||||
destination="aomp-dir",
|
||||
placement="amd-llvm-project",
|
||||
when="@" + ver,
|
||||
)
|
||||
|
||||
resource(
|
||||
name="flang",
|
||||
url=tools_url + "/flang/archive/rocm-" + ver + ".tar.gz",
|
||||
sha256=versions_dict[ver]["flang"],
|
||||
expand=True,
|
||||
destination="aomp-dir",
|
||||
placement="flang",
|
||||
when="@" + ver,
|
||||
)
|
||||
|
||||
resource(
|
||||
name="aomp-extras",
|
||||
url=tools_url + "/aomp-extras/archive/rocm-" + ver + ".tar.gz",
|
||||
sha256=versions_dict[ver]["extras"],
|
||||
expand=True,
|
||||
destination="aomp-dir",
|
||||
placement="aomp-extras",
|
||||
when="@" + ver,
|
||||
)
|
||||
|
||||
if ver == "3.5.0":
|
||||
resource(
|
||||
name="hip-on-vdi",
|
||||
url=tools_url + "/hip/archive/aomp-3.5.0.tar.gz",
|
||||
sha256=versions_dict["3.5.0"]["hip"],
|
||||
expand=True,
|
||||
destination="aomp-dir",
|
||||
placement="hip-on-vdi",
|
||||
when="@3.5.0",
|
||||
)
|
||||
|
||||
resource(
|
||||
name="vdi",
|
||||
url=tools_url + "/rocclr/archive/aomp-3.5.0.tar.gz",
|
||||
sha256=versions_dict["3.5.0"]["vdi"],
|
||||
expand=True,
|
||||
destination="aomp-dir",
|
||||
placement="vdi",
|
||||
when="@3.5.0",
|
||||
)
|
||||
|
||||
resource(
|
||||
name="opencl-on-vdi",
|
||||
sha256=versions_dict["3.5.0"]["opencl"],
|
||||
url=compute_url + "/ROCm-OpenCL-Runtime/archive/aomp-3.5.0.tar.gz",
|
||||
expand=True,
|
||||
destination="aomp-dir",
|
||||
placement="opencl-on-vdi",
|
||||
when="@3.5.0",
|
||||
)
|
||||
|
||||
# Copy source files over for debug build in 3.9.0
|
||||
patch(
|
||||
"0001-Add-cmake-option-for-copying-source-for-debugging.patch",
|
||||
working_dir="aomp-dir/amd-llvm-project",
|
||||
when="@3.9.0:",
|
||||
)
|
||||
|
||||
# Revert back to .amdgcn.bc naming scheme for 3.8.0
|
||||
patch(
|
||||
"0001-Add-amdgcn-to-devicelibs-bitcode-names-3.8.patch",
|
||||
working_dir="aomp-dir/amd-llvm-project",
|
||||
when="@3.8.0",
|
||||
)
|
||||
|
||||
# Revert back to .amdgcn.bc naming scheme for 3.7.0
|
||||
patch(
|
||||
"0001-Add-amdgcn-to-devicelibs-bitcode-names.patch",
|
||||
working_dir="aomp-dir/amd-llvm-project",
|
||||
when="@3.7.0",
|
||||
)
|
||||
|
||||
def patch(self):
|
||||
# Make sure python2.7 is used for the generation of hip header
|
||||
if self.spec.version == Version("3.5.0"):
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
with working_dir("aomp-dir/hip-on-vdi"):
|
||||
match = "^#!/usr/bin/python"
|
||||
python = self.spec["python"].command.path
|
||||
substitute = "#!{python}".format(python=python)
|
||||
files = ["hip_prof_gen.py", "vdi/hip_prof_gen.py"]
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
src = self.stage.source_path
|
||||
libomptarget = "{0}/aomp-dir/amd-llvm-project/openmp/libomptarget"
|
||||
aomp_extras = "{0}/aomp-dir/aomp-extras/aomp-device-libs"
|
||||
flang = "{0}/aomp-dir/flang/"
|
||||
|
||||
if self.spec.version >= Version("3.9.0"):
|
||||
filter_file(
|
||||
"ADDITIONAL_VERSIONS 2.7",
|
||||
"ADDITIONAL_VERSIONS 3",
|
||||
flang.format(src) + "CMakeLists.txt",
|
||||
)
|
||||
|
||||
if self.spec.version >= Version("3.8.0"):
|
||||
filter_file(
|
||||
"{CMAKE_INSTALL_PREFIX}",
|
||||
"{HSA_INCLUDE}",
|
||||
libomptarget.format(src) + "/hostrpc/services/CMakeLists.txt",
|
||||
)
|
||||
|
||||
filter_file(
|
||||
"CONFIG",
|
||||
"CONFIG PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH",
|
||||
libomptarget.format(src) + "/../libompd/test/CMakeLists.txt",
|
||||
)
|
||||
|
||||
if self.spec.version != Version("3.5.0"):
|
||||
filter_file(
|
||||
"{ROCM_DIR}/aomp/amdgcn/bitcode",
|
||||
"{DEVICE_LIBS_DIR}",
|
||||
libomptarget.format(src) + "/hostrpc/CMakeLists.txt",
|
||||
libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
|
||||
)
|
||||
|
||||
if self.spec.version == Version("3.5.0"):
|
||||
filter_file(
|
||||
"{ROCM_DIR}/lib/bitcode",
|
||||
"{DEVICE_LIBS_DIR}",
|
||||
libomptarget.format(src) + "/deviceRTLs/hostcall/CMakeLists.txt",
|
||||
)
|
||||
|
||||
filter_file(
|
||||
"{ROCM_DIR}/lib/bitcode",
|
||||
"{DEVICE_LIBS_DIR}",
|
||||
aomp_extras.format(src) + "/aompextras/CMakeLists.txt",
|
||||
aomp_extras.format(src) + "/libm/CMakeLists.txt",
|
||||
libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
|
||||
filter_file(
|
||||
r"${ROCM_DIR}/hsa/include ${ROCM_DIR}/hsa/include/hsa",
|
||||
"${HSA_INCLUDE}/hsa/include ${HSA_INCLUDE}/hsa/include/hsa",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
|
||||
filter_file(
|
||||
"{ROCM_DIR}/hsa/lib",
|
||||
"{HSA_LIB}",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
)
|
||||
|
||||
filter_file(
|
||||
r"{ROCM_DIR}/lib\)",
|
||||
"{HSAKMT_LIB})\nset(HSAKMT_LIB64 ${HSAKMT_LIB64})",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
)
|
||||
|
||||
filter_file(
|
||||
r"-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
|
||||
"-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS} -L${HSAKMT_LIB64}",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
|
||||
filter_file(
|
||||
r"-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
|
||||
"-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}" + ",-rpath,${HSAKMT_LIB64}",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
|
||||
filter_file(
|
||||
"{ROCM_DIR}/include",
|
||||
"{COMGR_INCLUDE}",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
)
|
||||
|
||||
filter_file(
|
||||
"{ROCM_DIR}/include",
|
||||
"{COMGR_INCLUDE}",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
)
|
||||
|
||||
filter_file(
|
||||
r"-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
|
||||
"-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX} -L${COMGR_LIB}",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
|
||||
filter_file(
|
||||
r"rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
|
||||
"rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}" + "-Wl,-rpath,${COMGR_LIB}",
|
||||
libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
devlibs_prefix = self.spec["rocm-device-libs"].prefix
|
||||
aomp_prefix = self.spec["aomp"].prefix
|
||||
env.set("HIP_DEVICE_LIB_PATH", "{0}/amdgcn/bitcode".format(format(devlibs_prefix)))
|
||||
env.set("AOMP", "{0}".format(format(aomp_prefix)))
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
aomp_prefix = self.spec["aomp"].prefix
|
||||
env.set("AOMP", "{0}".format(format(aomp_prefix)))
|
||||
env.set("FC", "{0}/bin/flang".format(format(aomp_prefix)))
|
||||
env.set("GFXLIST", "gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
src = self.stage.source_path
|
||||
gfx_list = "gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906;gfx908"
|
||||
aomp_prefix = self.spec["aomp"].prefix
|
||||
devlibs_prefix = self.spec["rocm-device-libs"].prefix
|
||||
hsa_prefix = self.spec["hsa-rocr-dev"].prefix
|
||||
hsakmt_prefix = self.spec["hsakmt-roct"].prefix
|
||||
comgr_prefix = self.spec["comgr"].prefix
|
||||
opencl_src = "/aomp-dir/opencl-on-vdi/api/opencl"
|
||||
omp_src = "/aomp-dir/amd-llvm-project/openmp"
|
||||
debug_map_format = "-fdebug-prefix-map={0}{1}={2}".format(src, omp_src, aomp_prefix)
|
||||
|
||||
if self.spec.version >= Version("3.9.0"):
|
||||
bitcode_dir = "/amdgcn/bitcode"
|
||||
else:
|
||||
bitcode_dir = "/lib"
|
||||
|
||||
components = dict()
|
||||
components["amd-llvm-project"] = [
|
||||
"../aomp-dir/amd-llvm-project/llvm",
|
||||
"-DLLVM_ENABLE_PROJECTS=clang;lld;compiler-rt",
|
||||
"-DCMAKE_BUILD_TYPE=release",
|
||||
"-DLLVM_ENABLE_ASSERTIONS=ON",
|
||||
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86",
|
||||
"-DCMAKE_C_COMPILER={0}".format(self.compiler.cc),
|
||||
"-DCMAKE_CXX_COMPILER={0}".format(self.compiler.cxx),
|
||||
"-DCMAKE_ASM_COMPILER={0}".format(self.compiler.cc),
|
||||
"-DBUG_REPORT_URL=https://github.com/ROCm/aomp",
|
||||
"-DLLVM_ENABLE_BINDINGS=OFF",
|
||||
"-DLLVM_INCLUDE_BENCHMARKS=OFF",
|
||||
"-DLLVM_BUILD_TESTS=OFF",
|
||||
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||
"-DCLANG_INCLUDE_TESTS=OFF",
|
||||
"-DCMAKE_VERBOSE_MAKEFILE=1",
|
||||
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE",
|
||||
]
|
||||
|
||||
if self.spec.version == Version("3.5.0"):
|
||||
components["vdi"] = [
|
||||
"../aomp-dir/vdi",
|
||||
"-DUSE_COMGR_LIBRARY=yes",
|
||||
"-DOPENCL_DIR={0}{1}".format(src, opencl_src),
|
||||
]
|
||||
|
||||
components["hip-on-vdi"] = [
|
||||
"../aomp-dir/hip-on-vdi",
|
||||
"-DVDI_ROOT={0}/aomp-dir/vdi".format(src),
|
||||
"-DHIP_COMPILER=clang",
|
||||
"-DHIP_PLATFORM=vdi",
|
||||
"-DVDI_DIR={0}/aomp-dir/vdi".format(src),
|
||||
"-DHSA_PATH={0}".format(hsa_prefix),
|
||||
"-DLIBVDI_STATIC_DIR={0}/spack-build-vdi".format(src),
|
||||
"-DCMAKE_CXX_FLAGS=-Wno-ignored-attributes",
|
||||
]
|
||||
|
||||
components["aomp-extras"] = [
|
||||
"../aomp-dir/aomp-extras",
|
||||
"-DROCM_PATH=$ROCM_DIR ",
|
||||
"-DDEVICE_LIBS_DIR={0}{1}".format(devlibs_prefix, bitcode_dir),
|
||||
"-DAOMP_STANDALONE_BUILD=0",
|
||||
"-DDEVICELIBS_ROOT={0}/aomp-dir/rocm-device-libs".format(src),
|
||||
"-DCMAKE_VERBOSE_MAKEFILE=1",
|
||||
]
|
||||
|
||||
openmp_common_args = [
|
||||
"-DROCM_DIR={0}".format(hsa_prefix),
|
||||
"-DDEVICE_LIBS_DIR={0}{1}".format(devlibs_prefix, bitcode_dir),
|
||||
"-DAOMP_STANDALONE_BUILD=0",
|
||||
"-DDEVICELIBS_ROOT={0}/aomp-dir/rocm-device-libs".format(src),
|
||||
"-DOPENMP_TEST_C_COMPILER={0}/bin/clang".format(aomp_prefix),
|
||||
"-DOPENMP_TEST_CXX_COMPILER={0}/bin/clang++".format(aomp_prefix),
|
||||
"-DLIBOMPTARGET_AMDGCN_GFXLIST={0}".format(gfx_list),
|
||||
"-DLIBOMP_COPY_EXPORTS=OFF",
|
||||
"-DHSA_INCLUDE={0}".format(hsa_prefix),
|
||||
"-DHSA_LIB={0}/lib".format(hsa_prefix),
|
||||
"-DHSAKMT_LIB={0}/lib".format(hsakmt_prefix),
|
||||
"-DHSAKMT_LIB64={0}/lib64".format(hsakmt_prefix),
|
||||
"-DCOMGR_INCLUDE={0}/include".format(comgr_prefix),
|
||||
"-DCOMGR_LIB={0}/lib".format(comgr_prefix),
|
||||
"-DOPENMP_ENABLE_LIBOMPTARGET=1",
|
||||
"-DOPENMP_ENABLE_LIBOMPTARGET_HSA=1",
|
||||
]
|
||||
|
||||
components["openmp"] = ["../aomp-dir/amd-llvm-project/openmp"]
|
||||
components["openmp"] += openmp_common_args
|
||||
|
||||
components["openmp-debug"] = [
|
||||
"../aomp-dir/amd-llvm-project/openmp",
|
||||
"-DLIBOMPTARGET_NVPTX_DEBUG=ON",
|
||||
"-DOPENMP_ENABLE_LIBOMPTARGET=1",
|
||||
"-DOPENMP_ENABLE_LIBOMPTARGET_HSA=1" "-DCMAKE_CXX_FLAGS=-g",
|
||||
"-DCMAKE_C_FLAGS=-g",
|
||||
]
|
||||
|
||||
if self.spec.version >= Version("3.9.0"):
|
||||
components["openmp-debug"] += [
|
||||
"-DENABLE_SOURCE_COPY=ON",
|
||||
"-DOPENMP_SOURCE_DEBUG_MAP={0}".format(debug_map_format),
|
||||
]
|
||||
|
||||
if self.spec.version >= Version("3.8.0"):
|
||||
components["openmp-debug"] += [
|
||||
"-DLIBOMP_ARCH=x86_64",
|
||||
"-DLIBOMP_OMP_VERSION=50",
|
||||
"-DLIBOMP_OMPT_SUPPORT=ON",
|
||||
"-DLIBOMP_USE_DEBUGGER=ON",
|
||||
"-DLIBOMP_CFLAGS=-O0",
|
||||
"-DLIBOMP_CPPFLAGS=-O0",
|
||||
"-DLIBOMP_OMPD_ENABLED=ON",
|
||||
"-DLIBOMP_OMPD_SUPPORT=ON",
|
||||
"-DLIBOMP_OMPT_DEBUG=ON",
|
||||
]
|
||||
|
||||
components["openmp-debug"] += openmp_common_args
|
||||
|
||||
flang_common_args = [
|
||||
"-DLLVM_ENABLE_ASSERTIONS=ON",
|
||||
"-DLLVM_CONFIG={0}/bin/llvm-config".format(aomp_prefix),
|
||||
"-DCMAKE_CXX_COMPILER={0}/bin/clang++".format(aomp_prefix),
|
||||
"-DCMAKE_C_COMPILER={0}/bin/clang".format(aomp_prefix),
|
||||
"-DCMAKE_Fortran_COMPILER={0}/bin/flang".format(aomp_prefix),
|
||||
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;x86",
|
||||
]
|
||||
|
||||
components["pgmath"] = ["../aomp-dir/flang/runtime/libpgmath"]
|
||||
components["pgmath"] += flang_common_args
|
||||
|
||||
components["flang"] = [
|
||||
"../aomp-dir/flang",
|
||||
"-DFLANG_OPENMP_GPU_AMD=ON",
|
||||
"-DFLANG_OPENMP_GPU_NVIDIA=ON",
|
||||
]
|
||||
|
||||
components["flang"] += flang_common_args
|
||||
|
||||
components["flang-runtime"] = [
|
||||
"../aomp-dir/flang",
|
||||
"-DLLVM_INSTALL_RUNTIME=ON",
|
||||
"-DFLANG_BUILD_RUNTIME=ON",
|
||||
"-DOPENMP_BUILD_DIR={0}/spack-build-openmp/runtime/src".format(src),
|
||||
]
|
||||
|
||||
components["flang-runtime"] += flang_common_args
|
||||
|
||||
if self.spec.version != Version("3.5.0"):
|
||||
build_order = [
|
||||
"amd-llvm-project",
|
||||
"aomp-extras",
|
||||
"openmp",
|
||||
"openmp-debug",
|
||||
"pgmath",
|
||||
"flang",
|
||||
"flang-runtime",
|
||||
]
|
||||
elif self.spec.version == Version("3.5.0"):
|
||||
build_order = [
|
||||
"amd-llvm-project",
|
||||
"vdi",
|
||||
"hip-on-vdi",
|
||||
"aomp-extras",
|
||||
"openmp",
|
||||
"openmp-debug",
|
||||
"pgmath",
|
||||
"flang",
|
||||
"flang-runtime",
|
||||
]
|
||||
|
||||
# Override standard CMAKE_BUILD_TYPE
|
||||
for arg in std_cmake_args:
|
||||
found = re.search("CMAKE_BUILD_TYPE", arg)
|
||||
if found:
|
||||
std_cmake_args.remove(arg)
|
||||
|
||||
for component in build_order:
|
||||
with working_dir("spack-build-{0}".format(component), create=True):
|
||||
cmake_args = components[component]
|
||||
cmake_args.extend(std_cmake_args)
|
||||
# OpenMP build needs to be run twice(Release, Debug)
|
||||
if component == "openmp-debug":
|
||||
cmake_args.append("-DCMAKE_BUILD_TYPE=Debug")
|
||||
else:
|
||||
cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
|
||||
cmake(*cmake_args)
|
||||
make()
|
||||
make("install")
|
|
@ -1,29 +0,0 @@
|
|||
From 7445b29108ea2f0b3f28f947a1ca627575173292 Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Fri, 7 Aug 2020 13:24:00 +0200
|
||||
Subject: [PATCH] Remove relative link paths to external libraries
|
||||
|
||||
---
|
||||
src/runtime/core/CMakeLists.txt | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/core/CMakeLists.txt b/src/runtime/core/CMakeLists.txt
|
||||
index 29abffb..f2cd4b4 100644
|
||||
--- a/src/runtime/core/CMakeLists.txt
|
||||
+++ b/src/runtime/core/CMakeLists.txt
|
||||
@@ -109,12 +109,6 @@ target_link_libraries(
|
||||
${amd_comgr_LIBRARIES}
|
||||
${LIBELF_LIBRARIES}
|
||||
${ROCM_LIBRARIES}
|
||||
- -L${ROCM_LIBRARIES_DIR}/../hsa/lib
|
||||
- -L${ROCM_LIBRARIES_DIR}
|
||||
- -Wl,--enable-new-dtags
|
||||
- -Wl,-rpath,\$ORIGIN
|
||||
- -Wl,-rpath,\$ORIGIN/../../hsa/lib
|
||||
- -Wl,-rpath,\$ORIGIN/../../lib
|
||||
)
|
||||
|
||||
# set output dir for .h files
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index ab4533a..9249de2 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -64,7 +64,7 @@ add_subdirectory(device_runtime)
|
||||
# make examples available in local build
|
||||
add_custom_command(
|
||||
OUTPUT examples
|
||||
- COMMAND /usr/bin/rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../examples .
|
||||
+ COMMAND rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../examples .
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../examples/*
|
||||
)
|
||||
add_custom_target(example ALL DEPENDS examples)
|
||||
@@ -72,7 +72,7 @@ add_custom_target(example ALL DEPENDS examples)
|
||||
# make bin available in local build
|
||||
add_custom_command(
|
||||
OUTPUT bin
|
||||
- COMMAND /usr/bin/rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../bin .
|
||||
+ COMMAND rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../bin .
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../bin/*
|
||||
)
|
||||
add_custom_target(script ALL DEPENDS bin)
|
||||
diff --git a/src/device_runtime/CMakeLists.txt b/src/device_runtime/CMakeLists.txt
|
||||
index 20e15a8..333cb47 100644
|
||||
--- a/src/device_runtime/CMakeLists.txt
|
||||
+++ b/src/device_runtime/CMakeLists.txt
|
||||
@@ -108,7 +108,7 @@ set (OUTPUT_INC_DIRECTORY ${ATMI_RUNTIME_PATH}/include)
|
||||
execute_process(COMMAND "/bin/mkdir" "-p" "${OUTPUT_INC_DIRECTORY}")
|
||||
add_custom_command(
|
||||
OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi_kl.h
|
||||
- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../include/atmi_kl.h ${OUTPUT_INC_DIRECTORY}/atmi_kl.h
|
||||
+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../include/atmi_kl.h ${OUTPUT_INC_DIRECTORY}/atmi_kl.h
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../include/*.h
|
||||
)
|
||||
add_custom_target(device_header ALL DEPENDS ${OUTPUT_INC_DIRECTORY}/atmi_kl.h)
|
||||
diff --git a/src/runtime/core/CMakeLists.txt b/src/runtime/core/CMakeLists.txt
|
||||
index 132a2f6..034a728 100644
|
||||
--- a/src/runtime/core/CMakeLists.txt
|
||||
+++ b/src/runtime/core/CMakeLists.txt
|
||||
@@ -128,13 +128,13 @@ execute_process(COMMAND "/bin/mkdir" "-p" "${OUTPUT_INC_DIRECTORY}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi.h
|
||||
- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi.h ${OUTPUT_INC_DIRECTORY}/atmi.h
|
||||
+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi.h ${OUTPUT_INC_DIRECTORY}/atmi.h
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/*.h
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi_runtime.h
|
||||
- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi_runtime.h ${OUTPUT_INC_DIRECTORY}/atmi_runtime.h
|
||||
+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi_runtime.h ${OUTPUT_INC_DIRECTORY}/atmi_runtime.h
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/*.h
|
||||
)
|
||||
|
||||
diff --git a/src/runtime/interop/hsa/CMakeLists.txt b/src/runtime/interop/hsa/CMakeLists.txt
|
||||
index f868972..97d8ae8 100644
|
||||
--- a/src/runtime/interop/hsa/CMakeLists.txt
|
||||
+++ b/src/runtime/interop/hsa/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ execute_process(COMMAND "/bin/mkdir" "-p" "${OUTPUT_INC_DIRECTORY}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi_interop_hsa.h
|
||||
- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/atmi_interop_hsa.h ${OUTPUT_INC_DIRECTORY}/atmi_interop_hsa.h
|
||||
+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/atmi_interop_hsa.h ${OUTPUT_INC_DIRECTORY}/atmi_interop_hsa.h
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/*.h
|
||||
)
|
||||
|
|
@ -34,94 +34,10 @@ class Atmi(CMakePackage):
|
|||
version("5.1.3", sha256="a43448d77705b2b07e1758ffe8035aa6ba146abc2167984e8cb0f1615797b341")
|
||||
version("5.1.0", sha256="6a758f5a8332e6774cd8e14a4e5ce05e43b1e05298d817b4068c35fa1793d333")
|
||||
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="3aea040f5a246539ab118f2183cf3e802a21e0e6215a53025eda77f382341747",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="208c1773170722b60b74357e264e698df5871e9d9d490d64011e6ea76750d9cf",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="c235cfb8bdd89deafecf9123264217b8cc5577a5469e3e1f24587fa820d0792e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="64eeb0244cedae99db7dfdb365e0ad624106cc1090a531f94885ae81e254aabf",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="4497fa6d33547b946e2a51619f2777ec36e9cff1b07fd534eb8a5ef0d8e30650",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="1cbe0e9258ce7cce7b7ccc288335dffbac821ceb745c4f3fd48e2a258abada89",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="c1c89c00d2dc3e764c63b2e51ff7fd5c06d5881ed56aed0adf639582d3389585",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="b31849f86c79f90466a9d67f0a28a93c1675181e38e2a5f571ffc963e4b06f5f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="8a2e5789ee7165aff0f0669eecd23ac0a5c8a5bfbc1acd9380fe9a8ed5bffe3a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="387e87c622ec334d3ba7a2f4f015ea9a219712722f4c56c1ef572203d0d072ea",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="0a305e85bab210dd9a0410aa01d46227e00b59141e4675c50d731ad1232ab828",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="039f0c2b369d0dbc01000754893d9210828f4cb9b36c3e70da8c3819b131c933",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="8df08489a10ee04cea911811393e0e7d91bd437fc1fd81a23a4e7ab924a974f3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="3fb57d2e583fab82bd0582d0c2bccff059ca91122c18ac49a7770a8bb041a37b",
|
||||
deprecated=True,
|
||||
)
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("rsync")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -134,18 +50,15 @@ class Atmi(CMakePackage):
|
|||
"5.5.0",
|
||||
"5.5.1",
|
||||
]:
|
||||
depends_on("comgr@" + ver, type="link", when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, type="link", when="@" + ver)
|
||||
depends_on("elf", type="link", when="@" + ver)
|
||||
depends_on(f"comgr@{ver}", type="link", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", type="link", when=f"@{ver}")
|
||||
depends_on("elf", type="link", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
root_cmakelists_dir = "src"
|
||||
|
||||
patch("0001-Remove-relative-link-paths-to-external-libraries.patch", when="@3.5.0")
|
||||
# Removing direct reference to /usr/bin/rysnc for rsync command.
|
||||
patch("0002-Remove-usr-bin-rsync-reference.patch", when="@4.0.0:5.0.0")
|
||||
# Reset the installation path and remove direct reference to rsync.
|
||||
patch("0002-Remove-usr-bin-rsync-reference-5.2.0.patch", when="@5.0.2:5.2.0")
|
||||
# Remove direct reference to /usr/bin/rsync path for rsync command
|
||||
|
|
|
@ -41,83 +41,12 @@ class Comgr(CMakePackage):
|
|||
version("5.2.0", sha256="5f63fa93739ee9230756ef93c53019474b6cdddea3b588492d785dae1b08c087")
|
||||
version("5.1.3", sha256="3078c10e9a852fe8357712a263ad775b15944e083f93a879935c877511066ac9")
|
||||
version("5.1.0", sha256="1cdcfe5acb768ef50fb0026d4ee7ba01e615251ad3c27bb2593cdcf8c070a894")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="20d733f70d8edb573d8c92707f663d7d46dcaff08026cd6addbb83266679f92a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="da1bbc694bd930a504406eb0a0018c2e317d8b2c136fb2cab8de426870efe9a8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="e45f387fb6635fc1713714d09364204cd28fea97655b313c857beb1f8524e593",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="03c5880e0922fcff31306f7da2eb9d3a3709d9b5b75b3524dcfae85f4b181678",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="f1d99550383ed7b3a01d304eedc3d86a8e45b271aa5a80b1dd099c22fda3f745",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="f77b505abb474078374701dfc49e651ad3eeec5349ce6edda54549943a3775ee",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="40a1ea50d2aea0cf75c4d17cdd6a7fe44ae999bf0147d24a756ca4675ce24e36",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="ffb625978555c63582aa46857672431793261166aa31761eff4fe5c2cab661ae",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="f389601fb70b2d9a60d0e2798919af9ddf7b8376a2e460141507fe50073dfb31",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="b44ee5805a6236213d758fa4b612bb859d8f774b9b4bdc3a2699bb009dd631bc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="6600e144d72dadb6d893a3388b42af103b9443755ce556f4e9e205ccd8ec0c83",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="62a35480dfabaa98883d91ed0f7c490daa9bbd424af37e07e5d85a6e8030b146",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="73e56ec3c63dade24ad351e9340e2f8e127694028c1fb7cec5035376bf098432",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="25c963b46a82d76d55b2302e0e18aac8175362656a465549999ad13d07b689b9",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# Disable the hip compile tests. Spack should not be using
|
||||
# /opt/rocm, and this breaks the build when /opt/rocm exists.
|
||||
patch("hip-tests.patch", when="@:4.2.0")
|
||||
|
||||
depends_on("cmake@3.2.0:", type="build", when="@:3.8")
|
||||
depends_on("cmake@3.13.4:", type="build", when="@3.9.0:")
|
||||
depends_on("cmake@3.13.4:", type="build")
|
||||
|
||||
depends_on("zlib-api", type="link")
|
||||
depends_on("z3", type="link")
|
||||
|
@ -126,20 +55,6 @@ class Comgr(CMakePackage):
|
|||
depends_on("rocm-cmake@3.5.0:", type="build")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -160,16 +75,14 @@ class Comgr(CMakePackage):
|
|||
"master",
|
||||
]:
|
||||
# llvm libs are linked statically, so this *could* be a build dep
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
|
||||
# aomp may not build rocm-device-libs as part of llvm-amdgpu, so make
|
||||
# that a conditional dependency
|
||||
depends_on(
|
||||
"rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver)
|
||||
)
|
||||
depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
root_cmakelists_dir = join_path("lib", "comgr")
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
From 98df37fc36b6276c26532e86e89be7e389745f4e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Torsten=20Ke=C3=9Fler?= <t.kessler@posteo.de>
|
||||
Date: Sun, 19 Jul 2020 11:58:24 +0200
|
||||
Subject: [PATCH] Fix search for OpenCL include dirs
|
||||
|
||||
---
|
||||
CMakeLists.txt | 26 +++++++++-----------------
|
||||
1 file changed, 9 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 122277ee..02ca4644 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -53,26 +53,18 @@ find_package(amd_comgr REQUIRED CONFIG
|
||||
)
|
||||
message(STATUS "Code Object Manager found at ${amd_comgr_DIR}.")
|
||||
|
||||
-# FIXME: Use find_package(OpenCL)
|
||||
-find_library( OpenCL REQUIRED CONFIG
|
||||
- PATHS
|
||||
- /opt/rocm
|
||||
+find_path(OPENCL_INCLUDE_DIR
|
||||
+ NAMES OpenCL/cl.h CL/cl.h
|
||||
+ PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64
|
||||
+ PATHS ${OPENCL_DIR}
|
||||
+ DOC "OpenCL include header OpenCL/cl.h or CL/cl.h"
|
||||
)
|
||||
|
||||
-if( NOT OPENCL_DIR )
|
||||
- find_path(OPENCL_INCLUDE_DIR
|
||||
- NAMES OpenCL/cl.h CL/cl.h
|
||||
- PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64
|
||||
- PATHS /opt/rocm
|
||||
- DOC "OpenCL include header OpenCL/cl.h or CL/cl.h"
|
||||
- )
|
||||
-
|
||||
- if( NOT OPENCL_INCLUDE_DIR )
|
||||
- unset(OPENCL_INCLUDE_DIR CACHE)
|
||||
- set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE )
|
||||
- endif()
|
||||
- message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.")
|
||||
+if( NOT OPENCL_INCLUDE_DIR )
|
||||
+ unset(OPENCL_INCLUDE_DIR CACHE)
|
||||
+ set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE )
|
||||
endif()
|
||||
+message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.")
|
||||
|
||||
|
||||
|
|
@ -13,19 +13,14 @@ class HipRocclr(CMakePackage):
|
|||
runtimes to work on Windows as well as on Linux without much effort."""
|
||||
|
||||
homepage = "https://github.com/ROCm/ROCclr"
|
||||
url = "https://github.com/ROCm/ROCclr/archive/rocm-5.6.1.tar.gz"
|
||||
git = "https://github.com/ROCm/ROCclr.git"
|
||||
tags = ["rocm"]
|
||||
|
||||
phases = ["cmake", "build"]
|
||||
|
||||
maintainers("srekolam", "renjithravindrankannath")
|
||||
|
||||
def url_for_version(self, version):
|
||||
# Fix up a typo in the 3.5.0 release.
|
||||
if version == Version("3.5.0"):
|
||||
return "https://github.com/ROCm/ROCclr/archive/roc-3.5.0.tar.gz"
|
||||
|
||||
url = "https://github.com/ROCm/ROCclr/archive/rocm-{0}.tar.gz"
|
||||
return url.format(version)
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("master", branch="main")
|
||||
|
@ -43,97 +38,12 @@ def url_for_version(self, version):
|
|||
version("5.2.0", sha256="37f5fce04348183bce2ece8bac1117f6ef7e710ca68371ff82ab08e93368bafb")
|
||||
version("5.1.3", sha256="ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48")
|
||||
version("5.1.0", sha256="f4f265604b534795a275af902b2c814f416434d9c9e16db81b3ed5d062187dfa")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="34decd84652268dde865f38e66f8fb4750a08c2457fea52ad962bced82a03e5e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="6b72faf8819628a5c109b2ade515ab9009606d10f11316f0d7e4c4c998d7f724",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="6581916a3303a31f76454f12f86e020fb5e5c019f3dbb0780436a8f73792c4d1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="ca8d6305ff0e620d9cb69ff7ac3898917db9e9b6996a7320244b48ab6511dd8e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="bda52c65f03a69a9d8ab1a118d45646d76843249fb975d67e5141e63fa3acc79",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="8a86b4f2a1b1c7ac628262e5b11b07ff42a224e62e594a4e0683aeb616062538",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="c57525af32c59becf56fd83cdd61f5320a95024d9baa7fb729a01e7a9fcdfd78",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="9eb1d88cfc9474979aaf29b99bcf9d3769a0f7f1f8f10660941aabf83d9eeb0c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="8db502d0f607834e3b882f939d33e8abe2f9b55ddafaf1b0c2cd29a0425ed76a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="d1ac02840c2dcb3d5fa3008fe9e313767ebe6d1dcf978a924341834ec96ebfe2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="d248958672ae35ab7f9fbd83827ccf352e2756dfa7819f6b614ace2e1a9a064e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="10d8aa6f5af7b51813015da603c4e75edc863c3530793f6ed9769ca345c08ed6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="a49f464bb2eab6317e87e3cc249aba3b2517a34fbdfe50175f0437f69a219adc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="87c1ee9f02b8aa487b628c543f058198767c474cec3d21700596a73c028959e1",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("gl@4.5:", type="link")
|
||||
depends_on("libelf", type="link", when="@3.7.0:3.8.0")
|
||||
depends_on("numactl", type="link", when="@3.7.0:")
|
||||
depends_on("numactl", type="link")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -149,23 +59,9 @@ def url_for_version(self, version):
|
|||
"5.6.1",
|
||||
"master",
|
||||
]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("comgr@" + ver, when="@" + ver)
|
||||
|
||||
# See: https://github.com/ROCm/ROCclr/pull/16
|
||||
# In 3.7.0 the find opengl things have changed slightly.
|
||||
patch("opengl.patch", when="@3.5.0")
|
||||
|
||||
resource(
|
||||
name="opencl-on-vdi",
|
||||
url="https://github.com/ROCm/ROCm-OpenCL-Runtime/archive/roc-3.5.0.tar.gz",
|
||||
sha256="511b617d5192f2d4893603c1a02402b2ac9556e9806ff09dd2a91d398abf39a0",
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="opencl-on-vdi",
|
||||
when="@3.5.0",
|
||||
)
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", when=f"@{ver}")
|
||||
|
||||
# Add opencl sources thru the below
|
||||
for d_version, d_shasum in [
|
||||
|
@ -182,30 +78,15 @@ def url_for_version(self, version):
|
|||
("5.2.0", "80f73387effdcd987a150978775a87049a976aa74f5770d4420847b004dd59f0"),
|
||||
("5.1.3", "44a7fac721abcd93470e1a7e466bdea0c668c253dee93e4f1ea9a72dbce4ba31"),
|
||||
("5.1.0", "362d81303048cf7ed5d2f69fb65ed65425bc3da4734fff83e3b8fbdda51b0927"),
|
||||
("5.0.2", "3edb1992ba28b4a7f82dd66fbd121f62bd859c1afb7ceb47fa856bd68feedc95"),
|
||||
("5.0.0", "2aa3a628b336461f83866c4e76225ef5338359e31f802987699d6308515ae1be"),
|
||||
("4.5.2", "96b43f314899707810db92149caf518bdb7cf39f7c0ad86e98ad687ffb0d396d"),
|
||||
("4.5.0", "3a163aed24619b3faf5e8ba17325bdcedd1667a904ea20914ac6bdd33fcdbca8"),
|
||||
("4.3.1", "7f98f7d4707b4392f8aa7017aaca9e27cb20263428a1a81fb7ec7c552e60c4ca"),
|
||||
("4.3.0", "d37bddcc6835b6c0fecdf4d02c204ac1d312076f3eef2b1faded1c4c1bc651e9"),
|
||||
("4.2.0", "18133451948a83055ca5ebfb5ba1bd536ed0bcb611df98829f1251a98a38f730"),
|
||||
("4.1.0", "0729e6c2adf1e3cf649dc6e679f9cb936f4f423f4954ad9852857c0a53ef799c"),
|
||||
("4.0.0", "d43ea5898c6b9e730b5efabe8367cc136a9260afeac5d0fe85b481d625dd7df1"),
|
||||
("3.10.0", "3aa9dc5a5f570320b04b35ee129ce9ff21062d2770df934c6c307913f975e93d"),
|
||||
("3.9.0", "286ff64304905384ce524cd8794c28aee216befd6c9267d4187a12e5a21e2daf"),
|
||||
("3.8.0", "7f75dd1abf3d771d554b0e7b0a7d915ab5f11a74962c92b013ee044a23c1270a"),
|
||||
("3.7.0", "283e1dfe4c3d2e8af4d677ed3c20e975393cdb0856e3ccd77b9c7ed2a151650b"),
|
||||
]:
|
||||
resource(
|
||||
name="opencl-on-vdi",
|
||||
url="https://github.com/ROCm/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz".format(
|
||||
d_version
|
||||
),
|
||||
url=f"https://github.com/ROCm/ROCm-OpenCL-Runtime/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="opencl-on-vdi",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
|
||||
resource(
|
||||
|
@ -217,28 +98,8 @@ def url_for_version(self, version):
|
|||
when="@master",
|
||||
)
|
||||
|
||||
@run_after("install")
|
||||
def deploy_missing_files(self):
|
||||
if "@3.5.0" in self.spec:
|
||||
# the amdrocclr_staticTargets.cmake file is generated but not
|
||||
# installed and when we install it by hand, we have to fix the
|
||||
# path to the static library libamdrocclr_static.a from build
|
||||
# dir to prefix lib dir.
|
||||
cmakefile = join_path(self.build_directory, "amdrocclr_staticTargets.cmake")
|
||||
filter_file(self.build_directory, self.prefix.lib, cmakefile)
|
||||
install(cmakefile, self.prefix.lib)
|
||||
elif self.spec.satisfies("@3.7.0:4.3.2"):
|
||||
path = join_path(self.prefix.lib, "cmake/rocclr/ROCclrConfig.cmake")
|
||||
filter_file(self.build_directory, self.prefix, path)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
return [
|
||||
self.define("USE_COMGR_LIBRARY", "yes"),
|
||||
self.define("OPENCL_DIR", join_path(self.stage.source_path, "opencl-on-vdi")),
|
||||
]
|
||||
return args
|
||||
|
||||
def __init__(self, spec):
|
||||
super().__init__(spec)
|
||||
if self.spec.satisfies("@4.5.0:"):
|
||||
self.phases = ["cmake", "build"]
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
From cf5f9124a629e0594c71daa6ea12ee823bf6a9fb Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Fri, 7 Aug 2020 23:09:43 +0200
|
||||
Subject: [PATCH] Make it possible to specify the package folder of
|
||||
rocm_agent_enumerator from the command line
|
||||
|
||||
---
|
||||
bin/hipcc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bin/hipcc b/bin/hipcc
|
||||
index 8c0a4796..48192ed1 100755
|
||||
--- a/bin/hipcc
|
||||
+++ b/bin/hipcc
|
||||
@@ -684,7 +684,8 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
|
||||
$targetsStr = $ENV{HCC_AMDGPU_TARGET};
|
||||
} else {
|
||||
# Else try using rocm_agent_enumerator
|
||||
- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
|
||||
+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH;
|
||||
+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
|
||||
$targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
|
||||
$targetsStr =~ s/\n/,/g;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From 4f324ddc12f358de47ea0ef1872c61b1dc4c46e2 Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Mon, 10 Aug 2020 15:00:06 +0200
|
||||
Subject: [PATCH] Fix detection of HIP_CLANG_ROOT
|
||||
|
||||
---
|
||||
hip-config.cmake.in | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hip-config.cmake.in b/hip-config.cmake.in
|
||||
index 859e2fa0..4baafbde 100644
|
||||
--- a/hip-config.cmake.in
|
||||
+++ b/hip-config.cmake.in
|
||||
@@ -58,8 +58,9 @@ if(HIP_COMPILER STREQUAL "clang")
|
||||
execute_process(COMMAND ${HIP_CXX_COMPILER} --version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE HIP_CLANG_CXX_COMPILER_VERSION_OUTPUT)
|
||||
- if(HIP_CLANG_CXX_COMPILER_VERSION_OUTPUT MATCHES "InstalledDir:[\t\r\n][\t\r\n]*([^\t\r\n])")
|
||||
- set(HIP_CLANG_ROOT ${CMAKE_MATCH_1})
|
||||
+ if(HIP_CLANG_CXX_COMPILER_VERSION_OUTPUT MATCHES "InstalledDir: ([^\t\r\n]+)")
|
||||
+ # InstalledDir points to the bin/ directory, so the root is the parent dir
|
||||
+ get_filename_component(HIP_CLANG_ROOT ${CMAKE_MATCH_1} DIRECTORY)
|
||||
else()
|
||||
set(HIP_CLANG_ROOT /opt/rocm/llvm)
|
||||
endif()
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f97fb83..a059c42 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -72,7 +72,17 @@ list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
|
||||
list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
|
||||
set(HIP_VERSION_GITDATE 0)
|
||||
|
||||
-find_package(Git)
|
||||
+# only look for git when we have a git repo
|
||||
+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
|
||||
+ find_package(Git)
|
||||
+endif()
|
||||
+
|
||||
+# FIXME: Two different version strings used.
|
||||
+
|
||||
+set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITDATE "0")
|
||||
+set(HIP_VERSION_PATCH "0")
|
||||
+
|
||||
|
||||
# FIXME: Two different version strings used.
|
||||
if(GIT_FOUND)
|
||||
@@ -118,9 +128,6 @@ if(GIT_FOUND)
|
||||
else()
|
||||
set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
|
||||
endif()
|
||||
-else()
|
||||
- # FIXME: Some parts depend on this being set.
|
||||
- set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
endif()
|
||||
|
||||
## Debian package specific variables
|
||||
diff --git a/hip-config.cmake.in b/hip-config.cmake.in
|
||||
index cbb4ffe..94e2ec1 100644
|
||||
--- a/hip-config.cmake.in
|
||||
+++ b/hip-config.cmake.in
|
||||
@@ -265,9 +265,6 @@ if(HIP_COMPILER STREQUAL "clang")
|
||||
endif()
|
||||
|
||||
# Add support for __fp16 and _Float16, explicitly link with compiler-rt
|
||||
- set_property(TARGET hip::host APPEND PROPERTY
|
||||
- INTERFACE_LINK_LIBRARIES "-L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64"
|
||||
- )
|
||||
set_property(TARGET hip::device APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES "-L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64"
|
||||
)
|
|
@ -1,56 +0,0 @@
|
|||
From 3a05d9ee5af2d318d27ee4b8e81542e2c81b9d5a Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Mon, 11 Jan 2021 16:38:14 +0100
|
||||
Subject: [PATCH] Improve compilation without git repo
|
||||
|
||||
---
|
||||
CMakeLists.txt | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7831bb4d..c0c7a536 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -42,9 +42,17 @@ string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION})
|
||||
list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
|
||||
list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
|
||||
|
||||
-find_package(Git)
|
||||
+# only look for git when we have a git repo
|
||||
+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
|
||||
+ find_package(Git)
|
||||
+endif()
|
||||
|
||||
# FIXME: Two different version strings used.
|
||||
+
|
||||
+set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITDATE "0")
|
||||
+set(HIP_VERSION_PATCH "0")
|
||||
+
|
||||
if(GIT_FOUND)
|
||||
# get date information based on UTC
|
||||
# use the last two digits of year + week number + day in the week as HIP_VERSION_GITDATE
|
||||
@@ -88,9 +96,6 @@ if(GIT_FOUND)
|
||||
else()
|
||||
set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
|
||||
endif()
|
||||
-else()
|
||||
- # FIXME: Some parts depend on this being set.
|
||||
- set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
endif()
|
||||
|
||||
## Debian package specific variables
|
||||
@@ -488,10 +493,6 @@ endif()
|
||||
# Generate .hipVersion
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo})
|
||||
|
||||
-if(NOT DEFINED HIP_VERSION_GITDATE)
|
||||
- set(HIP_VERSION_GITDATE 0)
|
||||
-endif()
|
||||
-
|
||||
# Build doxygen documentation
|
||||
find_program(DOXYGEN_EXE doxygen)
|
||||
if(DOXYGEN_EXE)
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
From db2a538d9beaef9092dff19c36ed8a2e291bc69a Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Mon, 11 Jan 2021 16:38:14 +0100
|
||||
Subject: [PATCH 1/2] Improve compilation without git repo
|
||||
|
||||
---
|
||||
CMakeLists.txt | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7f5bdad9..ca0e7ed4 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -44,9 +44,17 @@ string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION})
|
||||
list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
|
||||
list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
|
||||
|
||||
-find_package(Git)
|
||||
+# only look for git when we have a git repo
|
||||
+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
|
||||
+ find_package(Git)
|
||||
+endif()
|
||||
|
||||
# FIXME: Two different version strings used.
|
||||
+
|
||||
+set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITDATE "0")
|
||||
+set(HIP_VERSION_PATCH "0")
|
||||
+
|
||||
if(GIT_FOUND)
|
||||
# get date information based on UTC
|
||||
# use the last two digits of year + week number + day in the week as HIP_VERSION_GITDATE
|
||||
@@ -90,9 +98,6 @@ if(GIT_FOUND)
|
||||
else()
|
||||
set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
|
||||
endif()
|
||||
-else()
|
||||
- # FIXME: Some parts depend on this being set.
|
||||
- set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
endif()
|
||||
|
||||
add_to_config(_versionInfo HIP_VERSION_MAJOR)
|
||||
@@ -447,10 +452,6 @@ endif()
|
||||
# Generate .hipVersion
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo})
|
||||
|
||||
-if(NOT DEFINED HIP_VERSION_GITDATE)
|
||||
- set(HIP_VERSION_GITDATE 0)
|
||||
-endif()
|
||||
-
|
||||
# Generate hip_version.h
|
||||
set(_versionInfoHeader
|
||||
"// Auto-generated by cmake\n
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 483f8c9..8ddf76e 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -52,7 +52,16 @@ string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION})
|
||||
list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
|
||||
list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
|
||||
|
||||
-find_package(Git)
|
||||
+# only look for git when we have a git repo
|
||||
+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
|
||||
+ find_package(Git)
|
||||
+endif()
|
||||
+
|
||||
+# FIXME: Two different version strings used.
|
||||
+
|
||||
+set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITDATE "0")
|
||||
+set(HIP_VERSION_PATCH "0")
|
||||
|
||||
# FIXME: Two different version strings used.
|
||||
if(GIT_FOUND)
|
||||
@@ -98,9 +107,6 @@ if(GIT_FOUND)
|
||||
else()
|
||||
set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
|
||||
endif()
|
||||
-else()
|
||||
- # FIXME: Some parts depend on this being set.
|
||||
- set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
endif()
|
||||
|
||||
## Debian package specific variables
|
||||
@@ -295,10 +301,6 @@ file(WRITE "${PROJECT_BINARY_DIR}/.hipInfo" ${_buildInfo})
|
||||
# Generate .hipVersion
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo})
|
||||
|
||||
-if(NOT DEFINED HIP_VERSION_GITDATE)
|
||||
- set(HIP_VERSION_GITDATE 0)
|
||||
-endif()
|
||||
-
|
||||
# Build doxygen documentation
|
||||
find_program(DOXYGEN_EXE doxygen)
|
||||
if(DOXYGEN_EXE)
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 8b266132ee180ff8cc17b394ba64850f207a3dab Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Tue, 12 Jan 2021 12:26:44 +0100
|
||||
Subject: [PATCH] Drop clang rt builtins linking on hip::host
|
||||
|
||||
Ref this comment
|
||||
https://github.com/ROCm-Developer-Tools/HIP/pull/2217#discussion_r555402581:
|
||||
|
||||
> Yea, this should only be linked on hip::device as I believe its needed
|
||||
> for __fp16 support on the GPU. If users need this on the host-side,
|
||||
> then they should explicitly add it.
|
||||
---
|
||||
hip-config.cmake.in | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/hip-config.cmake.in b/hip-config.cmake.in
|
||||
index 6dfbd527..0ac1b659 100644
|
||||
--- a/hip-config.cmake.in
|
||||
+++ b/hip-config.cmake.in
|
||||
@@ -206,9 +206,6 @@ if(HIP_COMPILER STREQUAL "clang")
|
||||
endif()
|
||||
|
||||
# Add support for __fp16 and _Float16, explicitly link with compiler-rt
|
||||
- set_property(TARGET hip::host APPEND PROPERTY
|
||||
- INTERFACE_LINK_LIBRARIES -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
|
||||
- )
|
||||
set_property(TARGET hip::device APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
|
||||
)
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From 053bb794c57424fc47d53d8914bca1dc8d776a34 Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Tue, 12 Jan 2021 12:26:44 +0100
|
||||
Subject: [PATCH 2/2] Drop clang rt builtins linking on hip::host
|
||||
|
||||
Ref this comment
|
||||
https://github.com/ROCm-Developer-Tools/HIP/pull/2217#discussion_r555402581:
|
||||
|
||||
> Yea, this should only be linked on hip::device as I believe its needed
|
||||
> for __fp16 support on the GPU. If users need this on the host-side,
|
||||
> then they should explicitly add it.
|
||||
---
|
||||
hip-config.cmake.in | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/hip-config.cmake.in b/hip-config.cmake.in
|
||||
index ba340134..4daff392 100644
|
||||
--- a/hip-config.cmake.in
|
||||
+++ b/hip-config.cmake.in
|
||||
@@ -204,12 +204,6 @@ if(HIP_COMPILER STREQUAL "clang")
|
||||
endif()
|
||||
|
||||
# Add support for __fp16 and _Float16, explicitly link with compiler-rt
|
||||
- set_property(TARGET hip::host APPEND PROPERTY
|
||||
- INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
|
||||
- )
|
||||
- set_property(TARGET hip::host APPEND PROPERTY
|
||||
- INTERFACE_LINK_LIBRARIES -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
|
||||
- )
|
||||
set_property(TARGET hip::device APPEND PROPERTY
|
||||
INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
|
||||
)
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From 52f389bc39e6f3d1eb76225a82c23312dd6006ee Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Wed, 4 Aug 2021 15:12:10 +0200
|
||||
Subject: [PATCH] tests
|
||||
|
||||
---
|
||||
CMakeLists.txt | 30 ------------------------------
|
||||
1 file changed, 30 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4a34b02..37e1c3f 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -641,36 +641,6 @@ if(CLANGFORMAT_EXE)
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
-#############################
|
||||
-# Testing steps
|
||||
-#############################
|
||||
-# Target: test
|
||||
-set(HIP_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||
-
|
||||
- # Add tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/src)
|
||||
- hit_add_directory_recursive(${HIP_SRC_PATH}/tests/src "directed_tests")
|
||||
-
|
||||
- # Add unit tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/unit)
|
||||
- hit_add_directory_recursive(${HIP_SRC_PATH}/tests/unit "unit_tests")
|
||||
-
|
||||
- # Add top-level tests to build_tests
|
||||
- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
|
||||
-
|
||||
- # Add custom target: check
|
||||
- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
|
||||
-else()
|
||||
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||
-endif()
|
||||
|
||||
#############################
|
||||
# Code analysis
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
From 400797728d50d335c2399bc44ab2b1330d0c6dc4 Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Wed, 4 Aug 2021 15:10:00 +0200
|
||||
Subject: [PATCH] tests
|
||||
|
||||
---
|
||||
CMakeLists.txt | 42 ------------------------------------------
|
||||
1 file changed, 42 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 055543a..7e408b6 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -661,48 +661,6 @@ if(CLANGFORMAT_EXE)
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
-#############################
|
||||
-# Testing steps
|
||||
-#############################
|
||||
-# Target: test
|
||||
-set(HIP_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||
-
|
||||
- # Add tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/src)
|
||||
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/src "directed_tests")
|
||||
-
|
||||
- # Add unit tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/unit)
|
||||
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/unit "unit_tests")
|
||||
-
|
||||
- # Add performance tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/performance)
|
||||
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_PERFORMANCE} ${HIP_SRC_PATH}/tests/performance "performance_tests")
|
||||
-
|
||||
- # Add top-level tests to build_tests
|
||||
- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
|
||||
-
|
||||
- # Add top-level tests to build performance_tests.
|
||||
- # To build performance tests, just run "make build_perf"
|
||||
- add_custom_target(build_perf DEPENDS performance_tests)
|
||||
-
|
||||
- # Add custom target: perf.
|
||||
- # To run performance tests, just run "make perf"
|
||||
- add_custom_target(perf COMMAND "${CMAKE_CTEST_COMMAND}" -C "${HIP_CTEST_CONFIG_PERFORMANCE}" -R "performance_tests/" --verbose)
|
||||
-
|
||||
- # Add custom target: check
|
||||
- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
|
||||
-else()
|
||||
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||
-endif()
|
||||
|
||||
#############################
|
||||
# Code analysis
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
From 823d25faf479a83879a0faf73bf95eaae9ae9fff Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Wed, 4 Aug 2021 15:06:53 +0200
|
||||
Subject: [PATCH] Disable testing
|
||||
|
||||
---
|
||||
CMakeLists.txt | 45 ---------------------------------------------
|
||||
1 file changed, 45 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7831bb4..b8f420c 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -696,51 +696,6 @@ if(CLANGFORMAT_EXE)
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
-#############################
|
||||
-# Testing steps
|
||||
-#############################
|
||||
-# Target: test
|
||||
-set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
-if(HIP_PLATFORM STREQUAL "nvcc")
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||
-
|
||||
- # Add tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/src)
|
||||
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/src "directed_tests")
|
||||
-
|
||||
- # Add unit tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/unit)
|
||||
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/unit "unit_tests")
|
||||
-
|
||||
- # Add performance tests
|
||||
- include_directories(${HIP_SRC_PATH}/tests/performance)
|
||||
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_PERFORMANCE} ${HIP_SRC_PATH}/tests/performance "performance_tests")
|
||||
-
|
||||
- # Add top-level tests to build_tests
|
||||
- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
|
||||
-
|
||||
- # Add top-level tests to build performance_tests.
|
||||
- # To build performance tests, just run "make build_perf"
|
||||
- add_custom_target(build_perf DEPENDS performance_tests)
|
||||
-
|
||||
- # Add custom target: perf.
|
||||
- # To run performance tests, just run "make perf"
|
||||
- add_custom_target(perf COMMAND "${CMAKE_CTEST_COMMAND}" -C "${HIP_CTEST_CONFIG_PERFORMANCE}" -R "performance_tests/" --verbose)
|
||||
-
|
||||
- # Add custom target: check
|
||||
- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
|
||||
-else()
|
||||
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||
-endif()
|
||||
|
||||
#############################
|
||||
# Code analysis
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
From 0c097d01b70f479acc7c40cde35a057fafa072ba Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Wed, 4 Aug 2021 15:00:14 +0200
|
||||
Subject: [PATCH] Disable tests
|
||||
|
||||
---
|
||||
CMakeLists.txt | 19 -------------------
|
||||
1 file changed, 19 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a059c42..471fa97 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -488,25 +488,6 @@ if(CLANGFORMAT_EXE)
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
-#############################
|
||||
-# Testing steps
|
||||
-#############################
|
||||
-set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
-if(HIP_PLATFORM STREQUAL "nvidia")
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||
- include(${HIP_SRC_PATH}/tests/Tests.cmake)
|
||||
-else()
|
||||
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||
-endif()
|
||||
|
||||
#############################
|
||||
# Code analysis
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
|
||||
index b1ab39e..f1459ea 100755
|
||||
--- a/hipamd/CMakeLists.txt
|
||||
+++ b/hipamd/CMakeLists.txt
|
||||
@@ -87,7 +87,20 @@ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
|
||||
list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
|
||||
set(HIP_VERSION_GITDATE 0)
|
||||
|
||||
-find_package(Git)
|
||||
+# only look for git when we have a git repo
|
||||
+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
|
||||
+ find_package(Git)
|
||||
+endif()
|
||||
+
|
||||
+# FIXME: Two different version strings used.
|
||||
+
|
||||
+set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITDATE "0")
|
||||
+set(HIP_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITHASH "0")
|
||||
+set(HIP_VERSION_PATCH_GITHASH "0")
|
||||
+set (HIP_LIB_VERSION_PATCH "0")
|
||||
+
|
||||
|
||||
# FIXME: Two different version strings used.
|
||||
# Below we use UNIX commands, not compatible with Windows.
|
||||
@@ -132,9 +145,6 @@ if(GIT_FOUND)
|
||||
else()
|
||||
set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
|
||||
endif()
|
||||
-else()
|
||||
- # FIXME: Some parts depend on this being set.
|
||||
- set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
endif()
|
||||
|
||||
## Debian package specific variables
|
||||
@@ -177,7 +187,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
|
||||
if (${ROCM_PATCH_VERSION} )
|
||||
set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
|
||||
else ()
|
||||
- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
|
||||
+ set (HIP_LIB_VERSION_PATCH "0")
|
||||
endif ()
|
||||
set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
|
||||
if (DEFINED ENV{ROCM_RPATH})
|
||||
@@ -484,34 +494,6 @@ if(CLANGFORMAT_EXE)
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
-#############################
|
||||
-# Testing steps
|
||||
-#############################
|
||||
-# HIT is not compatible with Windows
|
||||
-if(NOT WIN32)
|
||||
-set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
-if(HIP_PLATFORM STREQUAL "nvidia")
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_INCLUDE_DIR}/hip/" "${HIP_ROOT_DIR}/include/hip/" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_DIR}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-if(${RUN_HIT} EQUAL 0)
|
||||
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_BIN_DIR}" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||
-endif()
|
||||
-if(HIP_CATCH_TEST EQUAL "1")
|
||||
- enable_testing()
|
||||
- add_subdirectory(${HIP_COMMON_DIR}/tests/catch ${PROJECT_BINARY_DIR}/catch)
|
||||
-else()
|
||||
- if(${RUN_HIT} EQUAL 0)
|
||||
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
- include(${HIP_COMMON_DIR}/tests/hit/HIT.cmake)
|
||||
- include(${HIP_COMMON_DIR}/tests/Tests.cmake)
|
||||
- else()
|
||||
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||
- endif()
|
||||
-endif()
|
||||
-endif()
|
||||
|
||||
#############################
|
||||
# Code analysis
|
||||
diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
|
||||
index 2edce6c..ee7d70c 100755
|
||||
--- a/hipamd/hip-config.cmake.in
|
||||
+++ b/hipamd/hip-config.cmake.in
|
||||
@@ -212,7 +212,7 @@ if(HIP_RUNTIME MATCHES "rocclr")
|
||||
|
||||
if(NOT WIN32)
|
||||
set_target_properties(hip::device PROPERTIES
|
||||
- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
|
||||
)
|
||||
endif()
|
||||
@@ -271,7 +271,6 @@ if(HIP_COMPILER STREQUAL "clang")
|
||||
endif()
|
||||
|
||||
# Add support for __fp16 and _Float16, explicitly link with compiler-rt
|
||||
- hip_add_interface_link_flags(hip::host -L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64)
|
||||
hip_add_interface_link_flags(hip::device -L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64)
|
||||
endif()
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
diff --git a/bin/hipcc b/bin/hipcc
|
||||
index 7b84067..9acccc0 100755
|
||||
--- a/bin/hipcc
|
||||
+++ b/bin/hipcc
|
||||
@@ -605,7 +605,8 @@ if($HIP_PLATFORM eq "amd"){
|
||||
$targetsStr = $ENV{HCC_AMDGPU_TARGET};
|
||||
} elsif (not $isWindows) {
|
||||
# Else try using rocm_agent_enumerator
|
||||
- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
|
||||
+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH;
|
||||
+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
|
||||
$targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
|
||||
$targetsStr =~ s/\n/,/g;
|
||||
}
|
||||
diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
|
||||
index 3c6ee26..39f4310 100755
|
||||
--- a/hipamd/CMakeLists.txt
|
||||
+++ b/hipamd/CMakeLists.txt
|
||||
@@ -88,7 +88,19 @@ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
|
||||
list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
|
||||
set(HIP_VERSION_GITDATE 0)
|
||||
|
||||
-find_package(Git)
|
||||
+# only look for git when we have a git repo
|
||||
+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
|
||||
+ find_package(Git)
|
||||
+endif()
|
||||
+
|
||||
+set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITDATE "0")
|
||||
+set(HIP_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_GITHASH "0")
|
||||
+set(HIP_VERSION_PATCH_GITHASH "0")
|
||||
+set (HIP_LIB_VERSION_PATCH "0")
|
||||
+set(HIP_VERSION_BUILD_ID 0)
|
||||
+set(HIP_VERSION_BUILD_NAME "")
|
||||
|
||||
# FIXME: Two different version strings used.
|
||||
# Below we use UNIX commands, not compatible with Windows.
|
||||
@@ -136,9 +148,6 @@ if(GIT_FOUND)
|
||||
else()
|
||||
set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
|
||||
endif()
|
||||
-else()
|
||||
- # FIXME: Some parts depend on this being set.
|
||||
- set(HIP_PACKAGING_VERSION_PATCH "0")
|
||||
endif()
|
||||
|
||||
## Debian package specific variables
|
||||
@@ -181,7 +190,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
|
||||
if (${ROCM_PATCH_VERSION} )
|
||||
set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
|
||||
else ()
|
||||
- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
|
||||
+ set (HIP_LIB_VERSION_PATCH "0")
|
||||
endif ()
|
||||
set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
|
||||
if (DEFINED ENV{ROCM_RPATH})
|
||||
diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
|
||||
index 274e3f1..2d024a8 100755
|
||||
--- a/hipamd/hip-config.cmake.in
|
||||
+++ b/hipamd/hip-config.cmake.in
|
||||
@@ -215,7 +215,7 @@ if(HIP_RUNTIME MATCHES "rocclr")
|
||||
|
||||
if(NOT WIN32)
|
||||
set_target_properties(hip::device PROPERTIES
|
||||
- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
|
||||
)
|
||||
endif()
|
||||
@@ -286,7 +286,6 @@ if(HIP_COMPILER STREQUAL "clang")
|
||||
if(CLANGRT_BUILTINS-NOTFOUND)
|
||||
message(FATAL_ERROR "clangrt builtins lib not found")
|
||||
else()
|
||||
- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
|
||||
set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
|
||||
endif()
|
||||
endif()
|
|
@ -1,125 +0,0 @@
|
|||
diff --git a/amdocl/cl_vk_amd.hpp b/amdocl/cl_vk_amd.hpp
|
||||
new file mode 100644
|
||||
index 0000000..8b6212b
|
||||
--- /dev/null
|
||||
+++ b/amdocl/cl_vk_amd.hpp
|
||||
@@ -0,0 +1,119 @@
|
||||
+/* Copyright (c) 2010-present Advanced Micro Devices, Inc.
|
||||
+
|
||||
+Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+of this software and associated documentation files (the "Software"), to deal
|
||||
+in the Software without restriction, including without limitation the rights
|
||||
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
+copies of the Software, and to permit persons to whom the Software is
|
||||
+furnished to do so, subject to the following conditions:
|
||||
+
|
||||
+The above copyright notice and this permission notice shall be included in
|
||||
+all copies or substantial portions of the Software.
|
||||
+
|
||||
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
+THE SOFTWARE. */
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+#include "platform/context.hpp"
|
||||
+#include "platform/memory.hpp"
|
||||
+
|
||||
+namespace amd
|
||||
+{
|
||||
+ class VkObject : public InteropObject
|
||||
+ {
|
||||
+ protected:
|
||||
+ amd::Os::FileDesc handleVk_;
|
||||
+
|
||||
+ public:
|
||||
+ //! GLObject constructor initializes member variables
|
||||
+ VkObject(
|
||||
+ amd::Os::FileDesc handle
|
||||
+ ) // Initialization of member variables
|
||||
+
|
||||
+ {
|
||||
+ handleVk_ = handle;
|
||||
+ }
|
||||
+
|
||||
+ virtual ~VkObject() {}
|
||||
+ VkObject* asVkObject() { return this; }
|
||||
+ amd::Os::FileDesc getVkSharedHandle() const { return handleVk_; }
|
||||
+
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ class BufferVk : public Buffer, public VkObject
|
||||
+ {
|
||||
+ protected:
|
||||
+ //! Initializes the device memory array which is nested
|
||||
+ // after'BufferVk' object in memory layout.
|
||||
+ void initDeviceMemory() {
|
||||
+ deviceMemories_ =
|
||||
+ reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(BufferVk));
|
||||
+ memset(deviceMemories_, 0, context_().devices().size() * sizeof(DeviceMemory));
|
||||
+ }
|
||||
+ public:
|
||||
+ //! BufferVk constructor just calls constructors of base classes
|
||||
+ //! to pass down the parameters
|
||||
+ BufferVk(
|
||||
+ Context& amdContext,
|
||||
+ size_t uiSizeInBytes,
|
||||
+ amd::Os::FileDesc handle)
|
||||
+ : // Call base classes constructors
|
||||
+ Buffer(
|
||||
+ amdContext,
|
||||
+ 0,
|
||||
+ uiSizeInBytes
|
||||
+ ),
|
||||
+ VkObject(
|
||||
+ handle
|
||||
+ )
|
||||
+ {
|
||||
+ setInteropObj(this);
|
||||
+ }
|
||||
+ virtual ~BufferVk() {}
|
||||
+
|
||||
+ BufferVk* asBufferVk() { return this; }
|
||||
+ };
|
||||
+
|
||||
+ // to be modified once image requirments are known, for now, implement like buffer
|
||||
+
|
||||
+ class ImageVk : public Buffer, public VkObject
|
||||
+ {
|
||||
+ protected:
|
||||
+ //! Initializes the device memory array which is nested
|
||||
+ // after'ImageVk' object in memory layout.
|
||||
+ void initDeviceMemory() {
|
||||
+ deviceMemories_ =
|
||||
+ reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(ImageVk));
|
||||
+ memset(deviceMemories_, 0, context_().devices().size() * sizeof(DeviceMemory));
|
||||
+ }
|
||||
+ public:
|
||||
+ //! ImageVk constructor just calls constructors of base classes
|
||||
+ //! to pass down the parameters
|
||||
+ ImageVk(
|
||||
+ Context& amdContext,
|
||||
+ size_t uiSizeInBytes,
|
||||
+ amd::Os::FileDesc handle)
|
||||
+ : // Call base classes constructors
|
||||
+ Buffer(
|
||||
+ amdContext,
|
||||
+ 0,
|
||||
+ uiSizeInBytes
|
||||
+ ),
|
||||
+ VkObject(
|
||||
+ handle
|
||||
+ )
|
||||
+ {
|
||||
+ setInteropObj(this);
|
||||
+ }
|
||||
+ virtual ~ImageVk() {}
|
||||
+
|
||||
+ ImageVk* asImageVk() { return this; }
|
||||
+ };
|
||||
+}
|
|
@ -45,76 +45,6 @@ class Hip(CMakePackage):
|
|||
version("5.2.0", sha256="a6e0515d4d25865c037b546035df9c51f0882cd2700e759c266ff7e199f37c3a")
|
||||
version("5.1.3", sha256="ce755ee6e407904eba3f6b3c9efcdd48eb4f58a26b06e1892166d05f19a75973")
|
||||
version("5.1.0", sha256="47e542183699f4005c48631d96f6a1fbdf27e07ad3402ccd7b5f707c2c602266")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="e23601e6f4f62083899ea6356fffbe88d1deb20fa61f2c970e3c0474cd8886ca",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="ae12fcda2d955f04a51c9e794bdb0fa96539cda88b6de8e377850e68e7c2a781",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="c2113dc3c421b8084cd507d91b6fbc0170765a464b71fb0d96bb875df368f160",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="4026f31fb4f8050e9aa9d4294f29c3410bfb38422dbbae4236ccd65fed4d55b2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="955311193819f487f9a2d64bffe07c4b8c3a0dc644dc3ad984f7c66a325bdd6f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="293b5025b5e153f2f25e465a2e0006a2b4606db7b7ec2ae449f8a4c0b52d491b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="ecb929e0fc2eaaf7bbd16a1446a876a15baf72419c723734f456ee62e70b4c24",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="e21c10b62868ece7aa3c8413ec0921245612d16d86d81fe61797bf9a64bc37eb",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="d7b78d96cec67c55b74ea3811ce861b16d300410bc687d0629e82392e8d7c857",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="0082c402f890391023acdfd546760f41cb276dffc0ffeddc325999fd2331d4e8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="25ad58691456de7fd9e985629d0ed775ba36a2a0e0b21c086bd96ba2fb0f7ed1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="6450baffe9606b358a4473d5f3e57477ca67cff5843a84ee644bcf685e75d839",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="757b392c3beb29beea27640832fbad86681dbd585284c19a4c2053891673babd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="ae8384362986b392288181bcfbe5e3a0ec91af4320c189bd83c844ed384161b3",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant("rocm", default=True, description="Enable ROCm support")
|
||||
variant("cuda", default=False, description="Build with CUDA")
|
||||
|
@ -123,8 +53,7 @@ class Hip(CMakePackage):
|
|||
|
||||
depends_on("cuda", when="+cuda")
|
||||
|
||||
depends_on("cmake@3.16.8:", type=("build"), when="@4.5.0:")
|
||||
depends_on("cmake@3.4.3:", type="build")
|
||||
depends_on("cmake@3.16.8:", type="build")
|
||||
depends_on("perl@5.10:", type=("build", "run"))
|
||||
|
||||
test_requires_compiler = True
|
||||
|
@ -133,33 +62,6 @@ class Hip(CMakePackage):
|
|||
depends_on("gl@4.5:")
|
||||
depends_on("py-cppheaderparser", type="build", when="@5.3.3:")
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
]:
|
||||
depends_on("hip-rocclr@" + ver, when="@" + ver)
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -178,12 +80,12 @@ class Hip(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("comgr@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@{0} +rocm-device-libs".format(ver), when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, when="@" + ver)
|
||||
depends_on("roctracer-dev-api@" + ver, when="@" + ver)
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver} +rocm-device-libs", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", when=f"@{ver}")
|
||||
depends_on(f"roctracer-dev-api@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in [
|
||||
"5.4.0",
|
||||
|
@ -197,9 +99,10 @@ class Hip(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hipify-clang", when="@" + ver)
|
||||
depends_on("hipify-clang", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
# hipcc likes to add `-lnuma` by default :(
|
||||
# ref https://github.com/ROCm/HIP/pull/2202
|
||||
depends_on("numactl", when="@3.7.0:")
|
||||
|
@ -221,19 +124,15 @@ class Hip(CMakePackage):
|
|||
("5.2.0", "8774958bebc29a4b7eb9dc2d38808d79d9a24bf9c1f44e801ff99d2d5ba82240"),
|
||||
("5.1.3", "707f2217f0e7aeb62d7b76830a271056d665542bf5f7a54e40adf4d5f299ca93"),
|
||||
("5.1.0", "77984854bfe00f938353fe4c7604d09967eaf5c609d05f1e6423d3c3dea86e61"),
|
||||
("5.0.2", "80e7268dd22eba0f2f9222932480dede1d80e56227c0168c6a0cc8e4f23d3b76"),
|
||||
("5.0.0", "cbd95a577abfd7cbffee14a4848f7789a417c6e5e5a713f42eb75d7948abcdf9"),
|
||||
("4.5.2", "b6f35b1a1d0c466b5af28e26baf646ae63267eccc4852204db1e0c7222a39ce2"),
|
||||
("4.5.0", "7b93ab64d6894ff9b5ba0be35e3ed8501d6b18a2a14223d6311d72ab8a9cdba6"),
|
||||
]:
|
||||
resource(
|
||||
name="hipamd",
|
||||
url="https://github.com/ROCm/hipamd/archive/rocm-{0}.tar.gz".format(d_version),
|
||||
url=f"https://github.com/ROCm/hipamd/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="hipamd",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
# Add opencl sources thru the below
|
||||
for d_version, d_shasum in [
|
||||
|
@ -248,21 +147,15 @@ class Hip(CMakePackage):
|
|||
("5.2.0", "80f73387effdcd987a150978775a87049a976aa74f5770d4420847b004dd59f0"),
|
||||
("5.1.3", "44a7fac721abcd93470e1a7e466bdea0c668c253dee93e4f1ea9a72dbce4ba31"),
|
||||
("5.1.0", "362d81303048cf7ed5d2f69fb65ed65425bc3da4734fff83e3b8fbdda51b0927"),
|
||||
("5.0.2", "3edb1992ba28b4a7f82dd66fbd121f62bd859c1afb7ceb47fa856bd68feedc95"),
|
||||
("5.0.0", "2aa3a628b336461f83866c4e76225ef5338359e31f802987699d6308515ae1be"),
|
||||
("4.5.2", "96b43f314899707810db92149caf518bdb7cf39f7c0ad86e98ad687ffb0d396d"),
|
||||
("4.5.0", "3a163aed24619b3faf5e8ba17325bdcedd1667a904ea20914ac6bdd33fcdbca8"),
|
||||
]:
|
||||
resource(
|
||||
name="opencl",
|
||||
url="https://github.com/ROCm/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz".format(
|
||||
d_version
|
||||
),
|
||||
url=f"https://github.com/ROCm/ROCm-OpenCL-Runtime/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="opencl",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
for d_version, d_shasum in [
|
||||
("5.5.1", "1375fc7723cfaa0ae22a78682186d4804188b0a54990bfd9c0b8eb421b85e37e"),
|
||||
|
@ -276,19 +169,15 @@ class Hip(CMakePackage):
|
|||
("5.2.0", "37f5fce04348183bce2ece8bac1117f6ef7e710ca68371ff82ab08e93368bafb"),
|
||||
("5.1.3", "ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48"),
|
||||
("5.1.0", "f4f265604b534795a275af902b2c814f416434d9c9e16db81b3ed5d062187dfa"),
|
||||
("5.0.2", "34decd84652268dde865f38e66f8fb4750a08c2457fea52ad962bced82a03e5e"),
|
||||
("5.0.0", "6b72faf8819628a5c109b2ade515ab9009606d10f11316f0d7e4c4c998d7f724"),
|
||||
("4.5.2", "6581916a3303a31f76454f12f86e020fb5e5c019f3dbb0780436a8f73792c4d1"),
|
||||
("4.5.0", "ca8d6305ff0e620d9cb69ff7ac3898917db9e9b6996a7320244b48ab6511dd8e"),
|
||||
]:
|
||||
resource(
|
||||
name="rocclr",
|
||||
url="https://github.com/ROCm/ROCclr/archive/rocm-{0}.tar.gz".format(d_version),
|
||||
url=f"https://github.com/ROCm/ROCclr/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="rocclr",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
# Add hip-clr sources thru the below
|
||||
for d_version, d_shasum in [
|
||||
|
@ -301,12 +190,12 @@ class Hip(CMakePackage):
|
|||
]:
|
||||
resource(
|
||||
name="clr",
|
||||
url="https://github.com/ROCm/clr/archive/refs/tags/rocm-{0}.tar.gz".format(d_version),
|
||||
url=f"https://github.com/ROCm/clr/archive/refs/tags/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="clr",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
|
||||
# Add hipcc sources thru the below
|
||||
|
@ -320,14 +209,12 @@ class Hip(CMakePackage):
|
|||
]:
|
||||
resource(
|
||||
name="hipcc",
|
||||
url="https://github.com/ROCm/HIPCC/archive/refs/tags/rocm-{0}.tar.gz".format(
|
||||
d_version
|
||||
),
|
||||
url=f"https://github.com/ROCm/HIPCC/archive/refs/tags/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="hipcc",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
# Add hiptests sources thru the below
|
||||
for d_version, d_shasum in [
|
||||
|
@ -340,27 +227,13 @@ class Hip(CMakePackage):
|
|||
]:
|
||||
resource(
|
||||
name="hip-tests",
|
||||
url="https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-{0}.tar.gz".format(
|
||||
d_version
|
||||
),
|
||||
url=f"https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="hip-tests",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
# Note: the ROCm ecosystem expects `lib/` and `bin/` folders with symlinks
|
||||
# in the parent directory of the package, which is incompatible with spack.
|
||||
# In hipcc the ROCM_PATH variable is used to point to the parent directory
|
||||
# of the package. With the following patch we should never hit code that
|
||||
# uses the ROCM_PATH variable again; just to be sure we set it to an empty
|
||||
# string.
|
||||
patch("0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch", when="@3.5.0:4.5.3")
|
||||
patch(
|
||||
"0010-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
|
||||
".5.0.0.patch",
|
||||
when="@5.0.0",
|
||||
)
|
||||
patch(
|
||||
"0011-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
|
||||
".5.0.2.patch",
|
||||
|
@ -382,35 +255,6 @@ class Hip(CMakePackage):
|
|||
)
|
||||
patch("0013-remove-compiler-rt-linkage-for-host.5.3.0.patch", when="@5.3.0:5.4")
|
||||
|
||||
# See https://github.com/ROCm/HIP/pull/2141
|
||||
patch("0002-Fix-detection-of-HIP_CLANG_ROOT.patch", when="@:3.9.0")
|
||||
|
||||
# See https://github.com/ROCm/HIP/pull/2218
|
||||
patch("0003-Improve-compilation-without-git-repo.3.7.0.patch", when="@3.7.0:3.9.0")
|
||||
patch("0003-Improve-compilation-without-git-repo.3.10.0.patch", when="@3.10.0:4.0.0")
|
||||
patch("0003-Improve-compilation-without-git-repo.4.1.0.patch", when="@4.1.0")
|
||||
patch(
|
||||
"0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
|
||||
".4.2.0.patch",
|
||||
when="@4.2.0:4.3.2",
|
||||
)
|
||||
patch(
|
||||
"0009-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
|
||||
"_disabletests.4.5.0.patch",
|
||||
when="@4.5.0:4.5.3",
|
||||
)
|
||||
# See https://github.com/ROCm/HIP/pull/2219
|
||||
patch("0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch", when="@3.7.0:3.9.0")
|
||||
patch("0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch", when="@3.10.0:4.1.0")
|
||||
|
||||
# Tests are broken when using cmake 3.21
|
||||
with when("^cmake@3.21.0:"):
|
||||
patch("0005-Disable-tests-3.5.0.patch", when="@3.5.0")
|
||||
patch("0005-Disable-tests-3.6.0.patch", when="@3.6.0:3.8.0")
|
||||
patch("0005-Disable-tests-3.9.0.patch", when="@3.9.0:4.0.0")
|
||||
patch("0005-Disable-tests-4.1.0.patch", when="@4.1.0:4.3.2")
|
||||
|
||||
patch("Add_missing_open_cl_header_file_for_4.3.0.patch", when="@4.3.0:4.3.2")
|
||||
patch("0014-hip-test-file-reorg-5.4.0.patch", when="@5.4.0:5.5")
|
||||
patch("0016-hip-sample-fix-hipMalloc-call.patch", when="@5.4.3:5.5")
|
||||
patch("0014-remove-compiler-rt-linkage-for-host.5.5.0.patch", when="@5.5")
|
||||
|
@ -430,9 +274,7 @@ class Hip(CMakePackage):
|
|||
|
||||
@property
|
||||
def root_cmakelists_dir(self):
|
||||
if self.spec.satisfies("@:4.3.2"):
|
||||
return self.stage.source_path
|
||||
elif self.spec.satisfies("@4.5:5.5"):
|
||||
if self.spec.satisfies("@4.5:5.5"):
|
||||
return "hipamd"
|
||||
else:
|
||||
return "clr"
|
||||
|
@ -536,10 +378,7 @@ def set_variables(self, env):
|
|||
# hipcc recognizes HIP_PLATFORM == hcc and HIP_COMPILER == clang, even
|
||||
# though below we specified HIP_PLATFORM=rocclr and HIP_COMPILER=clang
|
||||
# in the CMake args.
|
||||
if self.spec.satisfies("@:4.0.0"):
|
||||
env.set("HIP_PLATFORM", "hcc")
|
||||
else:
|
||||
env.set("HIP_PLATFORM", "amd")
|
||||
env.set("HIP_PLATFORM", "amd")
|
||||
|
||||
env.set("HIP_COMPILER", "clang")
|
||||
|
||||
|
@ -579,12 +418,11 @@ def set_variables(self, env):
|
|||
# to the hip prefix directory for non-external builds so that the
|
||||
# bin/.hipVersion file can still be parsed.
|
||||
# See also https://github.com/ROCm/HIP/issues/2223
|
||||
if "@3.8.0:" in self.spec:
|
||||
env.append_path(
|
||||
"HIPCC_COMPILE_FLAGS_APPEND",
|
||||
"--rocm-path={0}".format(paths["rocm-path"]),
|
||||
separator=" ",
|
||||
)
|
||||
env.append_path(
|
||||
"HIPCC_COMPILE_FLAGS_APPEND",
|
||||
"--rocm-path={0}".format(paths["rocm-path"]),
|
||||
separator=" ",
|
||||
)
|
||||
elif self.spec.satisfies("+cuda"):
|
||||
env.set("CUDA_PATH", self.spec["cuda"].prefix)
|
||||
env.set("HIP_PATH", self.spec.prefix)
|
||||
|
@ -611,13 +449,6 @@ def setup_dependent_package(self, module, dependent_spec):
|
|||
self.spec.hipcc = join_path(self.prefix.bin, "hipcc")
|
||||
|
||||
def patch(self):
|
||||
if self.spec.satisfies("@:4.3.2"):
|
||||
filter_file(
|
||||
'INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"',
|
||||
'INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"',
|
||||
"hip-config.cmake.in",
|
||||
string=True,
|
||||
)
|
||||
if self.spec.satisfies("@5.2:5.4 +rocm"):
|
||||
filter_file(
|
||||
'"${ROCM_PATH}/llvm"',
|
||||
|
@ -646,75 +477,26 @@ def patch(self):
|
|||
string=True,
|
||||
)
|
||||
perl = self.spec["perl"].command
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
|
||||
with working_dir("bin"):
|
||||
match = "^#!/usr/bin/perl"
|
||||
substitute = "#!{perl}".format(perl=perl)
|
||||
|
||||
if self.spec.satisfies("@:4.0.0"):
|
||||
files = ["hipify-perl", "hipcc", "extractkernel", "hipconfig", "hipify-cmakefile"]
|
||||
elif self.spec.satisfies("@4.0.0:4.3.2"):
|
||||
files = [
|
||||
"hipify-perl",
|
||||
"hipcc",
|
||||
"roc-obj-extract",
|
||||
"hipconfig",
|
||||
"hipify-cmakefile",
|
||||
"roc-obj-ls",
|
||||
"hipvars.pm",
|
||||
]
|
||||
elif self.spec.satisfies("@4.5.0:5.5"):
|
||||
files = []
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
# This guy is used during the cmake phase, so we have to fix the
|
||||
# shebang already here in case it is too long.
|
||||
filter_shebang("hipconfig")
|
||||
if self.spec.satisfies("@4.5.0:5.5"):
|
||||
perl = self.spec["perl"].command
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
with working_dir("hipamd/bin"):
|
||||
match = "^#!/usr/bin/perl"
|
||||
substitute = "#!{perl}".format(perl=perl)
|
||||
files = ["roc-obj-extract", "roc-obj-ls"]
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
if self.spec.satisfies("@5.6.0:"):
|
||||
perl = self.spec["perl"].command
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
match = "^#!/usr/bin/perl"
|
||||
substitute = "#!{perl}".format(perl=perl)
|
||||
with working_dir("clr/hipamd/bin"):
|
||||
files = ["roc-obj-extract", "roc-obj-ls"]
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
with working_dir("hipcc/bin"):
|
||||
files = []
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
filter_shebang("hipconfig")
|
||||
if "@3.7.0: +rocm" in self.spec:
|
||||
numactl = self.spec["numactl"].prefix.lib
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
|
||||
if self.spec.satisfies("@:5.5"):
|
||||
with working_dir("bin"):
|
||||
match = " -lnuma"
|
||||
substitute = " -L{numactl} -lnuma".format(numactl=numactl)
|
||||
if self.spec.satisfies("@4.5.0:5.5"):
|
||||
filter_file(match, substitute, "hipcc", **kwargs)
|
||||
if "@5.6.0: +rocm" in self.spec:
|
||||
filter_shebang("hipconfig")
|
||||
with working_dir("hipamd/bin"):
|
||||
filter_file("^#!/usr/bin/perl", f"#!{perl}", "roc-obj-extract", "roc-obj-ls")
|
||||
if self.spec.satisfies("@5.6:"):
|
||||
with working_dir("clr/hipamd/bin"):
|
||||
filter_file("^#!/usr/bin/perl", f"#!{perl}", "roc-obj-extract", "roc-obj-ls")
|
||||
with working_dir("hipcc/bin"):
|
||||
filter_shebang("hipconfig")
|
||||
|
||||
if self.spec.satisfies("+rocm"):
|
||||
numactl = self.spec["numactl"].prefix.lib
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
|
||||
with working_dir("hipcc/src"):
|
||||
match = " -lnuma"
|
||||
substitute = " -L{numactl} -lnuma".format(numactl=numactl)
|
||||
filter_file(match, substitute, "hipBin_amd.h", **kwargs)
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
if name == "cxxflags" and self.spec.satisfies("@3.7.0:4.3.2"):
|
||||
incl = self.spec["hip-rocclr"].prefix.include
|
||||
flags.append("-I {0}/compiler/lib/include".format(incl))
|
||||
flags.append("-I {0}/elf".format(incl))
|
||||
|
||||
return (flags, None, None)
|
||||
if self.spec.satisfies("@:5.5"):
|
||||
with working_dir("bin"):
|
||||
filter_file(" -lnuma", f" -L{numactl} -lnuma", "hipcc")
|
||||
elif self.spec.satisfies("@5.6:"):
|
||||
with working_dir("hipcc/src"):
|
||||
filter_file(" -lnuma", f" -L{numactl} -lnuma", "hipBin_amd.h")
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
|
@ -727,22 +509,14 @@ def cmake_args(self):
|
|||
self.spec["roctracer-dev-api"].prefix.roctracer.include.ext,
|
||||
)
|
||||
)
|
||||
if self.spec.satisfies("@:4.0.0"):
|
||||
args.append(self.define("HIP_RUNTIME", "ROCclr"))
|
||||
args.append(self.define("HIP_PLATFORM", "rocclr"))
|
||||
else:
|
||||
args.append(self.define("HIP_RUNTIME", "rocclr"))
|
||||
args.append(self.define("HIP_PLATFORM", "amd"))
|
||||
args.append(self.define("HIP_RUNTIME", "rocclr"))
|
||||
args.append(self.define("HIP_PLATFORM", "amd"))
|
||||
if self.spec.satisfies("+cuda"):
|
||||
args.append(self.define("HIP_PLATFORM", "nvidia"))
|
||||
|
||||
# LIBROCclr_STATIC_DIR is unused from 3.6.0 and above
|
||||
if "@3.5.0:4.3.2" in self.spec:
|
||||
args.append(self.define("LIBROCclr_STATIC_DIR", self.spec["hip-rocclr"].prefix.lib))
|
||||
if "@4.5.0:" in self.spec:
|
||||
args.append(self.define("HIP_COMMON_DIR", self.stage.source_path))
|
||||
args.append(self.define("HIP_CATCH_TEST", "OFF"))
|
||||
if "@4.5.0:5.5" in self.spec:
|
||||
args.append(self.define("HIP_COMMON_DIR", self.stage.source_path))
|
||||
args.append(self.define("HIP_CATCH_TEST", "OFF"))
|
||||
if "@:5.5" in self.spec:
|
||||
args.append(self.define("ROCCLR_PATH", self.stage.source_path + "rocclr"))
|
||||
args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path + "opencl"))
|
||||
if "@5.3.0:" in self.spec:
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
|
||||
index f2f5428..7d5a6f8 100644
|
||||
--- a/clients/benchmarks/CMakeLists.txt
|
||||
+++ b/clients/benchmarks/CMakeLists.txt
|
||||
@@ -94,7 +94,7 @@ if(LINK_BLIS)
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
- target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
|
||||
+ target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack blas)
|
||||
endif()
|
||||
|
||||
if(LINK_BLIS)
|
||||
diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
|
||||
index 9328055..188b7bc 100644
|
||||
--- a/clients/gtest/CMakeLists.txt
|
||||
+++ b/clients/gtest/CMakeLists.txt
|
||||
@@ -156,7 +156,7 @@ if (NOT WIN32)
|
||||
target_link_libraries( hipblas-test PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
|
||||
endif()
|
||||
|
||||
-target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack ${GTEST_LIBRARIES} )
|
||||
+target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack blas ${GTEST_LIBRARIES} )
|
||||
|
||||
if(LINK_BLIS)
|
||||
target_link_libraries( hipblas-test PRIVATE ${BLIS_LIBRARY} )
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
|
||||
index 9c9e1d7..c9ce5f0 100644
|
||||
--- a/clients/benchmarks/CMakeLists.txt
|
||||
+++ b/clients/benchmarks/CMakeLists.txt
|
||||
@@ -93,7 +93,7 @@ if(LINK_BLIS)
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
- target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
|
||||
+ target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack blas)
|
||||
endif()
|
||||
|
||||
if(LINK_BLIS)
|
||||
diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
|
||||
index 75dcce8..620102d 100644
|
||||
--- a/clients/gtest/CMakeLists.txt
|
||||
+++ b/clients/gtest/CMakeLists.txt
|
||||
@@ -172,7 +172,7 @@ if (NOT WIN32)
|
||||
target_link_libraries( hipblas-test PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
|
||||
endif()
|
||||
|
||||
-target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack ${GTEST_LIBRARIES} ${Boost_LIBRARIES} )
|
||||
+target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack blas ${GTEST_LIBRARIES} ${Boost_LIBRARIES} )
|
||||
|
||||
if(LINK_BLIS)
|
||||
target_link_libraries( hipblas-test PRIVATE ${BLIS_LIBRARY} )
|
|
@ -1,24 +0,0 @@
|
|||
diff -r -u a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
|
||||
--- a/clients/benchmarks/CMakeLists.txt 2021-10-28 14:14:41.379987882 -0600
|
||||
+++ b/clients/benchmarks/CMakeLists.txt 2021-10-28 13:37:50.409696036 -0600
|
||||
@@ -53,7 +53,7 @@
|
||||
$<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
|
||||
)
|
||||
|
||||
-target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
|
||||
+target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack blas)
|
||||
|
||||
# need mf16c flag for float->half convertion
|
||||
target_compile_options( hipblas-bench PRIVATE -mf16c)
|
||||
diff -r -u a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
|
||||
--- a/clients/gtest/CMakeLists.txt 2021-10-28 14:14:41.379987882 -0600
|
||||
+++ b/clients/gtest/CMakeLists.txt 2021-10-28 13:37:34.609274623 -0600
|
||||
@@ -146,7 +146,7 @@
|
||||
${ROCM_PATH}/hsa/include
|
||||
)
|
||||
|
||||
-target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack ${GTEST_LIBRARIES} ${Boost_LIBRARIES} hipblas_fortran_client )
|
||||
+target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack blas ${GTEST_LIBRARIES} ${Boost_LIBRARIES} hipblas_fortran_client )
|
||||
|
||||
# need mf16c flag for float->half convertion
|
||||
target_compile_options( hipblas-test PRIVATE -mf16c )
|
|
@ -42,76 +42,6 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
|
|||
version("5.2.0", sha256="5e9091dc4ef83896f5c3bc5ade1cb5db8e1a6afc451dbba4da19d8a7ec2b6f29")
|
||||
version("5.1.3", sha256="f0fdaa851971b41b48ec2e7d640746fbd6f9f433da2020c5fd95c91a7473d9e1")
|
||||
version("5.1.0", sha256="22faba3828e50a4c4e22f569a7d6441c797a11db1d472619c01d3515a3275e92")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="201772bfc422ecb2c50e898dccd7d3d376cf34a2b795360e34bf71326aa37646",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="63cffe748ed4a86fc80f408cb9e8a9c6c55c22a2b65c0eb9a76360b97bbb9d41",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="82dd82a41bbadbb2a91a2a44a5d8e0d2e4f36d3078286ed4db3549b1fb6d6978",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="187777ed49cc7c496c897e8ba80532d458c9afbc51a960e45f96923ad896c18e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="7b1f774774de5fa3d2b777e3a262328559d56165c32aa91b002505694362e7b2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="0631e21c588794ea1c8413ef8ff293606bcf7a52c0c3ff88da824f103395a76a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="c7ce7f69c7596b5a54e666fb1373ef41d1f896dd29260a691e2eadfa863e2b1a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="876efe80a4109ad53d290d2921b3fb425b4cb857b32920819f10dcd4deee4ef8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="6cc03af891b36cce8266d32ba8dfcf7fdfcc18afa7a6cc058fbe28bcf8528d94",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="45cb5e3b37f0845bd9e0d09912df4fa0ce88dd508ec9448241ae6600d3c4b1e8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="82ddd57fd905a5d4060665349ec017ff757a7c121cb9310574be3c3630b3545f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="33cb82e8b2658ae2096f39e41492ba8b6852ac37c26a730612b8642d9d29abe3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="9840a493ab4838c86696ceb33ce07c34b5f59f62db4f88cb3af62b69d84f8729",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="d451da80beb048767da71a090afceed2e111d01b3e95a7044deada5054d6e7b1",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
@ -136,35 +66,17 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
|
|||
depends_on("netlib-lapack@3.7.1:", type="test")
|
||||
depends_on("boost@1.64.0:1.76.0 +program_options cxxstd=14", type="test")
|
||||
|
||||
patch("link-clients-blas.patch", when="@4.3.0:4.3.2")
|
||||
patch("link-clients-blas-4.5.0.patch", when="@4.5.0:4.5.2")
|
||||
patch("hipblas-link-clients-blas-5.0.0.patch", when="@5.0.0:5.0.2")
|
||||
patch("remove-hipblas-clients-file-installation.patch", when="@5.5:5.7.1")
|
||||
patch("remove-hipblas-clients-file-installation-6.0.patch", when="@6.0:")
|
||||
|
||||
depends_on("rocm-cmake@5.2.0:", type="build", when="@5.2.0:5.7")
|
||||
depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:")
|
||||
depends_on("rocm-cmake@3.5.0:", type="build")
|
||||
depends_on("rocm-cmake@4.5.0:", type="build")
|
||||
for ver in ["6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-cmake@" + ver, when="+rocm @" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}", when=f"+rocm @{ver}")
|
||||
|
||||
depends_on("hip +cuda", when="+cuda")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -185,15 +97,11 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
|
|||
"master",
|
||||
"develop",
|
||||
]:
|
||||
depends_on("rocsolver@" + ver, when="+rocm @" + ver)
|
||||
depends_on("rocblas@" + ver, when="+rocm @" + ver)
|
||||
depends_on(f"rocsolver@{ver}", when=f"+rocm @{ver}")
|
||||
depends_on(f"rocblas@{ver}", when=f"+rocm @{ver}")
|
||||
for tgt in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"rocblas amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
|
||||
)
|
||||
depends_on(
|
||||
"rocsolver amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
|
||||
)
|
||||
depends_on(f"rocblas amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
|
||||
depends_on(f"rocsolver amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
|
@ -210,15 +118,11 @@ def cmake_args(self):
|
|||
args = [
|
||||
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
|
||||
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
|
||||
self.define_from_variant("USE_CUDA", "cuda"),
|
||||
]
|
||||
|
||||
if self.spec.satisfies("@:3.9.0"):
|
||||
args.append(self.define_from_variant("TRY_CUDA", "cuda"))
|
||||
else:
|
||||
args.append(self.define_from_variant("USE_CUDA", "cuda"))
|
||||
|
||||
# FindHIP.cmake was used for +rocm until 4.1.0 and is still used for +cuda
|
||||
if self.spec.satisfies("@:4.0") or self.spec.satisfies("+cuda"):
|
||||
# FindHIP.cmake is still used for +cuda
|
||||
if self.spec.satisfies("+cuda"):
|
||||
if self.spec["hip"].satisfies("@:5.1"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
|
||||
else:
|
||||
|
|
|
@ -35,76 +35,6 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage):
|
|||
version("5.2.0", sha256="ac4dc2310f0eb657e1337c93d8cc4a5d8396f9544a7336eeceb455678a1f9139")
|
||||
version("5.1.3", sha256="dc75640689b6a5e15dd3acea643266bdf114ea63efc60be8272f484cf8f04494")
|
||||
version("5.1.0", sha256="b30d51fc5fca2584f0c9a6fa8dafc9fbdda96a3acff30288e49b397f8842f705")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="22effb18f2c38d76fa379f14c9f9ee7a11987a5d1ae4a7e837af87232c8c9183",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="09c4f1b88aa5f50f04043d379e4960dab556e0fbdf8e25ab03d02a07c1ff7b2f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="bec9ba1a6aa0475475ee292e54807accc839ed001338275f48da13e3bfb77514",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="5902fae0485789f1d1cc6b8e81d9f1b39338170d3139844d5edf0d324f9694c9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="20fcd34323c541c182655b7ff6dc6ff268c0127596f0d9993884621c2b14b67a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="733499a8d55e2d73bf874d43a98ee7425e4325f77e03fb0c80debf36c740cb70",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="56b50e185b7cdf4615d2f56d3a4e86fe76f885e9ad04845f3d0671afcb315c69",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="6d33cc371b9a5ac9c0ab9853bac736f6cea0d2192f4dc9e6d8175d207ee4b4f2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="656bd6ec547810fd74bcebba41453e6e729f3fdb7346f5564ab71fc0346c3fb5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="759da5c6ef0cc1e4ecf2083659e78b8bbaa015f0bb360177674e0feb3032c5be",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="c46995f9f18733ec18e370c21d7c0d6ac719e8e9d3254c6303a20ba90831e12e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="11d7d97268aeb953c34a80125c4577e27cb57cb6095606533105cecf2bd2ec9c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="a2438632ea1606e83a8c0e1a8777aa5fdca66d77d90862642eb0ec2314b4978d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="1eb2cb5f6e90ed1b7a9ac6dd86f09ec2ea27bceb5a92eeffa9c2123950c53b9d",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
@ -123,28 +53,13 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage):
|
|||
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")
|
||||
conflicts("~cuda ~rocm", msg="CUDA or ROCm support is required")
|
||||
|
||||
depends_on("cmake@3.10.2:", type="build", when="@4.2.0:")
|
||||
depends_on("cmake@3.5.1:", type="build")
|
||||
depends_on("cmake@3.10.2:", type="build")
|
||||
|
||||
depends_on("hip +cuda", when="+cuda")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -163,8 +78,8 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocprim@" + ver, when="+rocm @" + ver)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on(f"rocprim@{ver}", when=f"+rocm @{ver}")
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
|
||||
# fix hardcoded search in /opt/rocm and broken config mode search
|
||||
patch("find-hip-cuda-rocm-5.1.patch", when="@5.1:5.2 +cuda")
|
||||
|
@ -180,8 +95,8 @@ def cmake_args(self):
|
|||
if self.spec.satisfies("+rocm ^cmake@3.21.0:3.21.2"):
|
||||
args.append(self.define("__skip_rocmclang", "ON"))
|
||||
|
||||
# FindHIP.cmake was used for +rocm until 3.7.0 and is still used for +cuda
|
||||
if self.spec.satisfies("@:3.7.0") or self.spec.satisfies("+cuda"):
|
||||
# FindHIP.cmake is still used for +cuda
|
||||
if self.spec.satisfies("+cuda"):
|
||||
if self.spec["hip"].satisfies("@:5.1"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
|
||||
else:
|
||||
|
|
|
@ -42,46 +42,6 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
|
|||
version("5.2.0", sha256="ec37edcd61837281c403802ccc1cb01ec3fa3ba135b5ab16617961b66d4cc3e2")
|
||||
version("5.1.3", sha256="c26fa64499293b25d0686bed04feb61378c878a4bb4a6d559e6cb7be1f6bf2ec")
|
||||
version("5.1.0", sha256="1bac7761c055355216cd262cdc0450aabb383addcb739b56ba849b2e6e013fa5")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="9ef64694f5def0d6fb98dc89e46d7a3f7d005a61348ac0b52184a3b8e84c2383",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="867d0bdc6c9769c6cebc0c4594b24d5f3504157cdcef97a6a1668dd493ca6a15",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="32ba6a5f50cfede3777a43794371ffb1363302131d8a0382d96df90ed7bc911a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="96636713bc6cdafbd5a9c1e98e816895448960c86b380fc0c3c9ffa28f670844",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="429cfd40415856da8f5c2c321b612800d6826ee121df5a4e6d1596cad5b51727",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="6e52e0eb5b2a13adaf317fe5b20b3e059589aabf2af87e4c67cb1022b861ba84",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="74253b0d92feff55ebb39b3fe4a22a6454160a60bdad37384aa5340fd8843f8a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="885ffd4813f2c271150f1b8b386f0af775b38fc82b96ce6fd94eb4ba0c0180be",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
@ -105,14 +65,6 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
|
|||
depends_on("hip +cuda", when="+cuda")
|
||||
|
||||
for ver in [
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -131,13 +83,11 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("rocfft@" + ver, when="+rocm @" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"rocfft@{ver}", when=f"+rocm @{ver}")
|
||||
|
||||
for tgt in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"rocfft amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
|
||||
)
|
||||
depends_on(f"rocfft amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
|
||||
# https://github.com/ROCm/rocFFT/pull/85)
|
||||
patch("001-remove-submodule-and-sync-shared-files-from-rocFFT.patch", when="@6.0.0")
|
||||
|
||||
|
|
|
@ -35,66 +35,6 @@ class Hipfort(CMakePackage):
|
|||
version("5.2.0", sha256="a0af1fe62757993600a41af6bb6c4b8c6cfdfba650389645ac1f995f7623785c")
|
||||
version("5.1.3", sha256="8f8849d8d0972366bafa41be35cf6a7a59480ed584d1ddff39768cb14247e9d4")
|
||||
version("5.1.0", sha256="1ddd46c00bb6bcd539a921d6a94d858f4e4408a35cb6910186c7517f375ae8ab")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="fcee6e62482ab15f365681dbc12bd9ae26b0fab2f2848a3c14de8ec63004a7aa",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="af0f332fec082a03ca0403618ab20d31baadf3103e3371db9edc39dc9474ef4c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="14599d027b57189c6734b04ace7792d2ae5c409cf7983c0970b086fb4e634dd8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="48626dfb15bb5dcb044c9e1d4dc4b0654a2cd0abfc69485aa285dc20d7f40d51",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="279a35edbc0c22fa930a4355e663a86adf4d0316c5b1b6b9ccc6ee5c19c8c2e4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="fd0ffdafdc17ac42c7dae3f89991651f15affdef9b2354da05c7493d09d8974e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="b411cb32bf87927eba4c5573b412c56d75d15165e2f1c8ac5ac18e624ed3a4b4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="2d335ae068d0cbb480575de7d3ea4868362af32cb195f911ee1aeced499f3974",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="a497645c33e0eff39abd5344756de63424733cde2837b7376c924b44ed5ae9c9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="44173522d9eb2a18ec1cea2d9b00b237fe70501f0849bd6be3decbb73389487a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="a3c4e125a9b56820446a65bd76b8caa196fddb0e0723eb513f0bcde9abd6a0c0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="0132e9949f758dd8b8a462d133b3316101440cd503aa6c53bea9e34e61bbb3cc",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.0.2:", type="build")
|
||||
|
||||
|
@ -103,18 +43,6 @@ class Hipfort(CMakePackage):
|
|||
depends_on("binutils", when="%cce")
|
||||
|
||||
for ver in [
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -133,7 +61,7 @@ class Hipfort(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", type="build", when=f"@{ver}")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("CXX", self.spec["hip"].hipcc)
|
||||
|
|
|
@ -38,76 +38,6 @@ class HipifyClang(CMakePackage):
|
|||
version("5.2.0", sha256="dcd5f44daceb984bb654a209e78debf81e1cdeaf9202444a1e110b45ad6c3f4f")
|
||||
version("5.1.3", sha256="6354b08b8ab2f4c481398fb768652bae00bb78c4cec7a11d5f6c7e4cb831ddf1")
|
||||
version("5.1.0", sha256="ba792294cbdcc880e0f02e38ee352dff8d4a2c183430e13d1c5ed176bd46cfc5")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="812bccfeb044483a1c7df89f45843afcb28d8146f348c792f082b693cbff3984",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="06fbb3259b6d014bc24fb3c05f71026bc39ae564559d40f2ca37236044c7ba17",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="f0d401e634642a1d6659b9163a38661ee38da1e1aceabb1f16f78f8fce048a4e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="1f6e1bd4b9d64eed67f519c453fa65b362a20583df1f35fd09d08de831f3c8de",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="c5754f7c2c68ea4f65cc0ffc1e8ccc30634181525b25c10817e07eaa75ca8157",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="182b336a994e3de0dfbce935dc35091388d18a29e3cfdadb2ab7da8a2dc121a2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="afdc82ae00e14e8e742be6cd47d8fb120d18fc52fe96cba8d8ac4c56176a432e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="ec9cc410167b6ab31706742f3d7a77dbd29eb548e7371134b3aace8597665475",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="9d3906d606fca2bcb58f5f2a70cc4b9e298ca0e12a84ee5f18e42b7df97b38a4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="7ebba22ed70100150bedddffa08a84f91b546347662862487b6703a1edce2623",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="07adb98e91ddd7420d873806866d53eaf77527fac57799e846823522191ba89a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="095b876a750a0dc1ae669102ba53d668f65062b823f8be745411db86a2db7916",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="dd58c8b88d4b7877f2521b02954de79d570fa36fc751a17d33e56436ee02571e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="31e7c11d3e221e15a2721456c4f8bceea9c28fd37345464c86ea74cf05ddf2c9",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# the patch was added to install the targets in the correct directory structure
|
||||
# this will fix the issue https://github.com/spack/spack/issues/30711
|
||||
|
@ -117,20 +47,6 @@ class HipifyClang(CMakePackage):
|
|||
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -150,10 +66,10 @@ class HipifyClang(CMakePackage):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
# The installer puts the binaries directly into the prefix
|
||||
|
|
|
@ -46,26 +46,6 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
|
|||
version("5.2.0", sha256="96927410e0a2cc0f50172604ef6437e15d2cf4b62d22b2035f13aae21f43dc82")
|
||||
version("5.1.3", sha256="96faa799a2db8078b72f9c3b5c199179875a7c20dc1064371b22a6a63397c145")
|
||||
version("5.1.0", sha256="697ba2b2814e7ac6f79680e6455b4b5e0def1bee2014b6940f47be7d13c0ae74")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="cabeada451686ed7904a452c5f8fd3776721507db1c06f426cd8d7189ff4a441",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="c59a5783dbbcb6a601c0e73d85d4a64d6d2c8f46009c01cb2b9886323f11e02b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="9807bf1da0da25940b546cf5d5d6064d46d837907e354e10c6eeb2ef7c296a93",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="ee1176e977736a6e6fcba507fe6f56fcb3cefd6ba741cceb28464ea8bc476cd8",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
@ -99,10 +79,6 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
|
|||
depends_on("hip +cuda", when="+cuda")
|
||||
|
||||
for ver in [
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -123,16 +99,12 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
|
|||
"master",
|
||||
"develop",
|
||||
]:
|
||||
depends_on("rocblas@" + ver, when="+rocm @" + ver)
|
||||
depends_on("rocsolver@" + ver, when="+rocm @" + ver)
|
||||
depends_on(f"rocblas@{ver}", when=f"+rocm @{ver}")
|
||||
depends_on(f"rocsolver@{ver}", when=f"+rocm @{ver}")
|
||||
|
||||
for tgt in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"rocblas amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
|
||||
)
|
||||
depends_on(
|
||||
"rocsolver amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
|
||||
)
|
||||
depends_on(f"rocblas amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
|
||||
depends_on(f"rocsolver amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
depends_on("netlib-lapack@3.7.1:", type="test")
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
From 530047af4a0f437dafc02f76b3a17e3b1536c7ec Mon Sep 17 00:00:00 2001
|
||||
From: Nico Trost <nico.trost@amd.com>
|
||||
Date: Sun, 21 Jun 2020 20:54:09 +0200
|
||||
Subject: [PATCH] fix for csr2csr_compress and nnz_compress
|
||||
|
||||
---
|
||||
library/src/nvcc_detail/hipsparse.cpp | 24 ++++--------------------
|
||||
1 file changed, 4 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/library/src/nvcc_detail/hipsparse.cpp b/library/src/nvcc_detail/hipsparse.cpp
|
||||
index 0883351..d7cbb8c 100644
|
||||
--- a/library/src/nvcc_detail/hipsparse.cpp
|
||||
+++ b/library/src/nvcc_detail/hipsparse.cpp
|
||||
@@ -5213,10 +5213,6 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
||||
int* nnzC,
|
||||
hipComplex tol)
|
||||
{
|
||||
- cuComplex cutol;
|
||||
- cutol.x = tol.x;
|
||||
- cutol.y = tol.y;
|
||||
-
|
||||
return hipCUSPARSEStatusToHIPStatus(cusparseCnnz_compress((cusparseHandle_t)handle,
|
||||
m,
|
||||
(const cusparseMatDescr_t)descrA,
|
||||
@@ -5224,7 +5220,7 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
||||
csrRowPtrA,
|
||||
nnzPerRow,
|
||||
nnzC,
|
||||
- cutol));
|
||||
+ {cuCrealf(tol), cuCimagf(tol)}));
|
||||
}
|
||||
|
||||
hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
||||
@@ -5236,10 +5232,6 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
||||
int* nnzC,
|
||||
hipDoubleComplex tol)
|
||||
{
|
||||
- cuDoubleComplex cutol;
|
||||
- cutol.x = tol.x;
|
||||
- cutol.y = tol.y;
|
||||
-
|
||||
return hipCUSPARSEStatusToHIPStatus(cusparseZnnz_compress((cusparseHandle_t)handle,
|
||||
m,
|
||||
(const cusparseMatDescr_t)descrA,
|
||||
@@ -5247,7 +5239,7 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
||||
csrRowPtrA,
|
||||
nnzPerRow,
|
||||
nnzC,
|
||||
- cutol));
|
||||
+ {cuCreal(tol), cuCimag(tol)}));
|
||||
}
|
||||
|
||||
hipsparseStatus_t hipsparseXcsr2coo(hipsparseHandle_t handle,
|
||||
@@ -5773,10 +5765,6 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
||||
int* csrRowPtrC,
|
||||
hipComplex tol)
|
||||
{
|
||||
- cuComplex cutol;
|
||||
- cutol.x = tol.x;
|
||||
- cutol.y = tol.y;
|
||||
-
|
||||
return hipCUSPARSEStatusToHIPStatus(cusparseCcsr2csr_compress((cusparseHandle_t)handle,
|
||||
m,
|
||||
n,
|
||||
@@ -5789,7 +5777,7 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
||||
(cuComplex*)csrValC,
|
||||
csrColIndC,
|
||||
csrRowPtrC,
|
||||
- cutol));
|
||||
+ {cuCrealf(tol), cuCimagf(tol)}));
|
||||
}
|
||||
|
||||
hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
||||
@@ -5806,10 +5794,6 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
||||
int* csrRowPtrC,
|
||||
hipDoubleComplex tol)
|
||||
{
|
||||
- cuDoubleComplex cutol;
|
||||
- cutol.x = tol.x;
|
||||
- cutol.y = tol.y;
|
||||
-
|
||||
return hipCUSPARSEStatusToHIPStatus(cusparseZcsr2csr_compress((cusparseHandle_t)handle,
|
||||
m,
|
||||
n,
|
||||
@@ -5822,7 +5806,7 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
||||
(cuDoubleComplex*)csrValC,
|
||||
csrColIndC,
|
||||
csrRowPtrC,
|
||||
- cutol));
|
||||
+ {cuCreal(tol), cuCimag(tol)}));
|
||||
}
|
||||
|
||||
hipsparseStatus_t hipsparseShyb2csr(hipsparseHandle_t handle,
|
|
@ -1,93 +0,0 @@
|
|||
From e79985dccde22d826aceb3badfc643a3227979d2 Mon Sep 17 00:00:00 2001
|
||||
From: Nico Trost <nico.trost@amd.com>
|
||||
Date: Sun, 21 Jun 2020 20:48:22 +0200
|
||||
Subject: [PATCH] fix for csr2csr_compress and nnz_compress
|
||||
|
||||
---
|
||||
library/src/hcc_detail/hipsparse.cpp | 24 ++++--------------------
|
||||
1 file changed, 4 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/library/src/hcc_detail/hipsparse.cpp b/library/src/hcc_detail/hipsparse.cpp
|
||||
index 7786d6e..5cf0ad6 100644
|
||||
--- a/library/src/hcc_detail/hipsparse.cpp
|
||||
+++ b/library/src/hcc_detail/hipsparse.cpp
|
||||
@@ -6284,10 +6284,6 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
||||
int* csrRowPtrC,
|
||||
hipComplex tol)
|
||||
{
|
||||
- rocsparse_float_complex rtol;
|
||||
- rtol.x = tol.x;
|
||||
- rtol.y = tol.y;
|
||||
-
|
||||
return rocSPARSEStatusToHIPStatus(
|
||||
rocsparse_ccsr2csr_compress((rocsparse_handle)handle,
|
||||
m,
|
||||
@@ -6301,7 +6297,7 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
||||
(rocsparse_float_complex*)csrValC,
|
||||
csrRowPtrC,
|
||||
csrColIndC,
|
||||
- rtol));
|
||||
+ {hipCrealf(tol), hipCimagf(tol)}));
|
||||
}
|
||||
|
||||
hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
||||
@@ -6318,10 +6314,6 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
||||
int* csrRowPtrC,
|
||||
hipDoubleComplex tol)
|
||||
{
|
||||
- rocsparse_double_complex rtol;
|
||||
- rtol.x = tol.x;
|
||||
- rtol.y = tol.y;
|
||||
-
|
||||
return rocSPARSEStatusToHIPStatus(
|
||||
rocsparse_zcsr2csr_compress((rocsparse_handle)handle,
|
||||
m,
|
||||
@@ -6335,7 +6327,7 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
||||
(rocsparse_double_complex*)csrValC,
|
||||
csrRowPtrC,
|
||||
csrColIndC,
|
||||
- rtol));
|
||||
+ {hipCreal(tol), hipCimag(tol)}));
|
||||
}
|
||||
|
||||
hipsparseStatus_t hipsparseShyb2csr(hipsparseHandle_t handle,
|
||||
@@ -7006,10 +6998,6 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
||||
int* nnzC,
|
||||
hipComplex tol)
|
||||
{
|
||||
- rocsparse_float_complex rtol;
|
||||
- rtol.x = tol.x;
|
||||
- rtol.y = tol.y;
|
||||
-
|
||||
RETURN_IF_ROCSPARSE_ERROR(rocsparse_cnnz_compress((rocsparse_handle)handle,
|
||||
m,
|
||||
(const rocsparse_mat_descr)descrA,
|
||||
@@ -7017,7 +7005,7 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
||||
csrRowPtrA,
|
||||
nnzPerRow,
|
||||
nnzC,
|
||||
- rtol));
|
||||
+ {hipCrealf(tol), hipCimagf(tol)}));
|
||||
return HIPSPARSE_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -7030,10 +7018,6 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
||||
int* nnzC,
|
||||
hipDoubleComplex tol)
|
||||
{
|
||||
- rocsparse_double_complex rtol;
|
||||
- rtol.x = tol.x;
|
||||
- rtol.y = tol.y;
|
||||
-
|
||||
RETURN_IF_ROCSPARSE_ERROR(rocsparse_znnz_compress((rocsparse_handle)handle,
|
||||
m,
|
||||
(const rocsparse_mat_descr)descrA,
|
||||
@@ -7041,7 +7025,7 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
||||
csrRowPtrA,
|
||||
nnzPerRow,
|
||||
nnzC,
|
||||
- rtol));
|
||||
+ {hipCreal(tol), hipCimag(tol)}));
|
||||
return HIPSPARSE_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -39,76 +39,6 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
|
|||
version("5.2.0", sha256="4fdab6ec953c6d2d000687c5979077deafd37208cd722554b5a6ede1e5ba170c")
|
||||
version("5.1.3", sha256="6e6a0752654f0d391533df8cedf4b630a78ad34c99087741520c582963ce1602")
|
||||
version("5.1.0", sha256="f41329534f2ff477a0db6b7f77a72bb062f117800970c122d676db8b207ce80b")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="a266e8b3bbdea04617260f51b3d85cc672af6ca417cae0812d04fd9702429c47",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="0a1754508e06d3a6b17593a71a3c57a3e25d3b46d88573098fda11442853196c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="81ca24491fbf2bc8e5aa477a6c38776877579ac9f4241ddadeca76a579a7ebb5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="1049c490fc2008d701a16d14e11004e3bc5b4da993aa48b117e3c44be5677e3c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="e5757b5213b880237ae0f24616088f79c449c2955cf2133642dbbc9c655f4691",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="194fbd589ce34471f3255f71ea5fca2d27bee47a464558a86d0713b4d26237ea",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="cdedf3766c10200d3ebabe86cbb9c0fe6504e4b3317dccca289327d7c189bb3f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="66710c390489922f0bd1ac38fd8c32fcfb5b7760b92c2d282f7d1abf214742ee",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="fc3736b2ea203209021616b2ffbcdd664781d692b07b8e8bb7f78b42dabbd5e5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="7fd863ebf6eed09325c23ba06d9008b2f2c1345283d1a331e329e1a512b602f7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="ab0ea3dd9b68a126291ed5a35e50fc85d0aeb35fe862f5d9e544435e4262c435",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="8874c100e9ba54587a6057c2a0e555a0903254a16e9e01c2385bae1b027f83b5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="a2f02d8fc6ad9a561f06dacde54ecafd30563c5c95f93819a5694e5b650dad7f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="fa16b2a307a5d9716066c2876febcbc1cef855bf0c96d235d2d8f2206a0fb69d",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
@ -133,20 +63,6 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
|
|||
depends_on("git", type="build")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -165,16 +81,12 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("rocsparse@" + ver, when="+rocm @" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"rocsparse@{ver}", when=f"+rocm @{ver}")
|
||||
|
||||
for tgt in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"rocsparse amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
|
||||
)
|
||||
depends_on(f"rocsparse amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
|
||||
|
||||
patch("e79985dccde22d826aceb3badfc643a3227979d2.patch", when="@3.5.0")
|
||||
patch("530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch", when="@3.5.0")
|
||||
patch("0a90ddc4c33ed409a938513b9dbdca8bfad65e06.patch", when="@:5.4")
|
||||
|
||||
@classmethod
|
||||
|
@ -197,8 +109,8 @@ def cmake_args(self):
|
|||
|
||||
args.append(self.define_from_variant("BUILD_CUDA", "cuda"))
|
||||
|
||||
# FindHIP.cmake was used for +rocm until 5.0.0 and is still used for +cuda
|
||||
if self.spec.satisfies("@:4") or self.spec.satisfies("+cuda"):
|
||||
# FindHIP.cmake is still used for +cuda
|
||||
if self.spec.satisfies("+cuda"):
|
||||
if self.spec["hip"].satisfies("@:5.1"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
|
||||
else:
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
From 905b812fffdf109f767e1dc079ac1d32d5cf5838 Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Wed, 5 Aug 2020 17:44:05 +0200
|
||||
Subject: [PATCH] Do not set an explicit rpath by default, since package
|
||||
managers cannot override them
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 7174044..10c6fcc 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -114,7 +114,9 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR}/libamdhsacode )
|
||||
add_definitions ( -DROCR_BUILD_ID=${PACKAGE_VERSION_STRING} )
|
||||
|
||||
## Set RUNPATH - ../../lib covers use of the legacy symlink in /hsa/lib/
|
||||
-set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64")
|
||||
+if (NOT CMAKE_INSTALL_RPATH)
|
||||
+ set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64")
|
||||
+endif ()
|
||||
|
||||
## ------------------------- Linux Compiler and Linker options -------------------------
|
||||
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function" )
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -42,76 +42,6 @@ class HsaRocrDev(CMakePackage):
|
|||
version("5.2.0", sha256="529e49693dd9f6459586dd0a26f14dd77dbdf8c0b45fb54830b294eba7babd27")
|
||||
version("5.1.3", sha256="479340ec34cdffbbdb1002c85a47d1fccd23e8394631a1f001ef6130be08287d")
|
||||
version("5.1.0", sha256="a5f7245059c3d28dbc037e1e6fa3f09084e29147096dd61f7ce5560291ab330f")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="94ce313f3b37e6571778dc6865d73dafa798cbaf4de63b5307382c4a2418e99f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="61644365ea2b09fa7ec22f3dbdb74f2b6b1daa34b180138da9e0c856006a373e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="d99eddedce0a97d9970932b64b0bb4743e47d2740e8db0288dbda7bec3cefa80",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="fbf550f243dddfef46a716e360b77c43886fed3eef67215ab9dab1c82f3851ca",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="85fbd1645120b71635844090ce8bd9f7af0a3d1065d5fae476879f99ba0c0475",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="2a08657a517971447fc233cb2c8ee2e117c6ab5efc31af147b28b3ef59b3847d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="fa0e7bcd64e97cbff7c39c9e87c84a49d2184dc977b341794770805ec3f896cc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="c223a5f7ccac280520abb6ea49fdd36fa9468718098a9d984be6ef839ccbc6db",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="e84c48e80ea38698a5bd5da3940048ad3cab3696d10a53132acad07ca357f17c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="58866d8acdb6cc45227f2412098e37c65908b20ed3dd54901dfb515c15ad5f71",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="d722fb61f62037894957856f2c2d17231c4622bdf75db372321ee30206dceeb6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="1dfad4d89d6c099e15073ed38e083bcf6cc463470dcc8a1e1b9e22060c060c72",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="0071d14431f73ce74574e61d0786f2b7cf34b14ea898a1f54b6e1b06b2d468c0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="52c12eec3e3404c0749c70f156229786ee0c3e6d3c979aed9bbaea500fa1f3b8",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant("shared", default=True, description="Build shared or static library")
|
||||
variant("image", default=True, description="build with or without image support")
|
||||
|
@ -128,20 +58,6 @@ class HsaRocrDev(CMakePackage):
|
|||
depends_on("pkgconfig", type="build", when="@5.3.0:")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -161,18 +77,14 @@ class HsaRocrDev(CMakePackage):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
# allow standalone rocm-device-libs (useful for aomp)
|
||||
depends_on(
|
||||
"rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver)
|
||||
)
|
||||
depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
# Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways
|
||||
patch("0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch", when="@3.5.0")
|
||||
patch("0002-Remove-explicit-RPATH-again.patch", when="@3.7.0:5.6")
|
||||
|
||||
root_cmakelists_dir = "src"
|
||||
|
@ -200,18 +112,16 @@ def cmake_args(self):
|
|||
args = [
|
||||
self.define("LIBELF_INCLUDE_DIRS", libelf_include),
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define_from_variant("IMAGE_SUPPORT", "image"),
|
||||
]
|
||||
|
||||
if self.spec.satisfies("@3.7.0:"):
|
||||
args.append(self.define_from_variant("IMAGE_SUPPORT", "image"))
|
||||
# device libs is bundled with llvm-amdgpu (default) or standalone
|
||||
if self.spec.satisfies("^rocm-device-libs"):
|
||||
bitcode_dir = spec["rocm-device-libs"].prefix.amdgcn.bitcode
|
||||
else:
|
||||
bitcode_dir = spec["llvm-amdgpu"].prefix.amdgcn.bitcode
|
||||
|
||||
# device libs is bundled with llvm-amdgpu (default) or standalone
|
||||
if self.spec.satisfies("^rocm-device-libs"):
|
||||
bitcode_dir = spec["rocm-device-libs"].prefix.amdgcn.bitcode
|
||||
else:
|
||||
bitcode_dir = spec["llvm-amdgpu"].prefix.amdgcn.bitcode
|
||||
|
||||
args.append(self.define("BITCODE_DIR", bitcode_dir))
|
||||
args.append(self.define("BITCODE_DIR", bitcode_dir))
|
||||
|
||||
if self.spec.satisfies("@5.6:"):
|
||||
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
|
||||
|
|
|
@ -40,76 +40,6 @@ class HsakmtRoct(CMakePackage):
|
|||
version("5.2.0", sha256="3797cb0eafbec3fd3d4a2b53f789eb8cdbab30729f13dbcca0a10bc1bafd2187")
|
||||
version("5.1.3", sha256="3c66b1aa7451571ce8bee10e601d34b93c9416b9be476610ee5685dbad81034a")
|
||||
version("5.1.0", sha256="032717e80b1aefed59f11399e575564ee86ee7c125e889f7c79c2afdfab1eb93")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="f2a27ac18aada1dc0dba6455beb7dd7d88a4457c1917024ea372fecb03356e97",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="1d803572eac0d6186260b5671268bad7513aa9433f9c2e99f14c8bf766c02122",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="fb8e44226b9e393baf51bfcb9873f63ce7e4fcf7ee7f530979cf51857ea4d24b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="620b39959e0ee5d709b8cf6eb3cc06c8356d72838343756230c638899b10bb9a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="9d0727e746d4ae6e2709e3534d91046640be511a71c027f47db25e529fe3b4d4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="1ef5fe687bc23ffda17841fe354c1fb94e9aaf276ca9e5757488852f9066f231",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="cc325d4b9a96062f2ad0515fce724a8c64ba56a7d7f1ac4a0753941b8599c52e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="8443ed5907a7ba9ad4003a49d90ff7b8886e1b2a5e90f14e4035765a7f64d7ca",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="a6960fffc8388731ee18953faae12d1449c582e3b3594418845a544455895f42",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="a3d629247a763cc36f5d48e9122cee8498574af628e14e3c38686c05f66e3e06",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="e1bb8b010855736d8a97957222f648532d42646ec2964776a9a1455dc81104a3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="cd5440f31f592737b5d05448704bd01f91f73cfcab8a7829922e81332575cfe8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="b357fe7f425996c49f41748923ded1a140933de7564a70a828ed6ded6d896458",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="d9f458c16cb62c3c611328fd2f2ba3615da81e45f3b526e45ff43ab4a67ee4aa",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant("shared", default=True, description="Build shared or static library")
|
||||
variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
|
||||
|
@ -120,24 +50,17 @@ class HsakmtRoct(CMakePackage):
|
|||
depends_on("libdrm", when="@4.5.0:")
|
||||
|
||||
for ver in ["5.3.0", "5.4.0", "5.4.3"]:
|
||||
depends_on("llvm-amdgpu@" + ver, type="test", when="@" + ver)
|
||||
depends_on(f"llvm-amdgpu@{ver}", type="test", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, type="test", when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", type="test", when=f"@{ver}")
|
||||
|
||||
# See https://github.com/ROCm/ROCT-Thunk-Interface/issues/72
|
||||
# and https://github.com/spack/spack/issues/28398
|
||||
patch("0001-Remove-compiler-support-libraries-and-libudev-as-req.patch", when="@4.5.0:5.2")
|
||||
patch("0002-Remove-compiler-support-libraries-and-libudev-as-req-5.3.patch", when="@5.3.0:5.4")
|
||||
|
||||
@property
|
||||
def install_targets(self):
|
||||
if self.version == Version("3.5.0"):
|
||||
return ["install", "install-dev"]
|
||||
else:
|
||||
return ["install"]
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
if self.spec.satisfies("@:5.4.3"):
|
||||
|
@ -145,7 +68,7 @@ def cmake_args(self):
|
|||
else:
|
||||
args.append(self.define("BUILD_SHARED_LIBS", False))
|
||||
if self.spec.satisfies("@5.4.3:"):
|
||||
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
|
||||
args.append(self.define("CMAKE_INSTALL_LIBDIR", "lib"))
|
||||
if self.spec.satisfies("@5.7.0:"):
|
||||
args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
|
||||
|
||||
|
|
|
@ -36,10 +36,9 @@ class Libceed(MakefilePackage, CudaPackage, ROCmPackage):
|
|||
variant("libxsmm", default=False, description="Enable LIBXSMM backend", when="@0.3:")
|
||||
variant("magma", default=False, description="Enable MAGMA backend", when="@0.6:")
|
||||
|
||||
conflicts("+rocm", when="@:0.6")
|
||||
conflicts("+rocm", when="@:0.7")
|
||||
|
||||
with when("+rocm"):
|
||||
depends_on("hip@3.8.0", when="@0.7:0.7.99")
|
||||
depends_on("hip@3.8.0:", when="@0.8:")
|
||||
depends_on("hipblas@3.8.0:", when="@0.8:")
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
Adapt the fix-system-zlib-ncurses.patch for version 3.9.0.
|
||||
|
||||
--- llvm-project-rocm-3.9.0/llvm/cmake/config-ix.cmake.orig 2020-11-20 21:41:10.498772540 -0600
|
||||
+++ llvm-project-rocm-3.9.0/llvm/cmake/config-ix.cmake 2020-11-20 22:27:57.242391054 -0600
|
||||
@@ -126,15 +126,11 @@
|
||||
endif()
|
||||
if(LLVM_ENABLE_TERMINFO)
|
||||
set(HAVE_TERMINFO 0)
|
||||
- foreach(library terminfo tinfo curses ncurses ncursesw)
|
||||
- string(TOUPPER ${library} library_suffix)
|
||||
- check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
|
||||
- if(HAVE_TERMINFO_${library_suffix})
|
||||
- set(HAVE_TERMINFO 1)
|
||||
- set(TERMINFO_LIBS "${library}")
|
||||
- break()
|
||||
- endif()
|
||||
- endforeach()
|
||||
+ find_library(FIND_TERMINFO NAMES terminfo tinfo curses ncurses ncursesw)
|
||||
+ if(FIND_TERMINFO)
|
||||
+ set(HAVE_TERMINFO 1)
|
||||
+ set(TERMINFO_LIBS "${FIND_TERMINFO}")
|
||||
+ endif()
|
||||
else()
|
||||
set(HAVE_TERMINFO 0)
|
||||
endif()
|
|
@ -1,94 +0,0 @@
|
|||
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
@@ -58,19 +58,16 @@
|
||||
llvm::sys::path::append(PackagePath, SubDirs[0]);
|
||||
return PackagePath;
|
||||
}
|
||||
- if (SubDirs.size() == 0) {
|
||||
- unsigned DiagID = D.getDiags().getCustomDiagID(
|
||||
- DiagnosticsEngine::Error,
|
||||
- "Expecting SPACK package %0 at %1 but not found");
|
||||
- D.Diag(DiagID) << Prefix << Cand.Path;
|
||||
+ if (SubDirs.size() == 0 && Verbose) {
|
||||
+ llvm::errs() << "SPACK package " << Prefix << " not found at " << Cand.Path
|
||||
+ << '\n';
|
||||
return {};
|
||||
}
|
||||
|
||||
- assert(SubDirs.size() > 1);
|
||||
- unsigned DiagID = D.getDiags().getCustomDiagID(
|
||||
- DiagnosticsEngine::Error,
|
||||
- "Expecting one SPACK package %0 at %1 but found more");
|
||||
- D.Diag(DiagID) << Prefix << Cand.Path;
|
||||
+ if (SubDirs.size() > 1 && Verbose) {
|
||||
+ llvm::errs() << "Cannot use SPACK package " << Prefix << " at " << Cand.Path
|
||||
+ << " due to multiple installations for the same version\n";
|
||||
+ }
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -305,6 +302,7 @@
|
||||
const Driver &D, const llvm::Triple &HostTriple,
|
||||
const llvm::opt::ArgList &Args, bool DetectHIPRuntime, bool DetectDeviceLib)
|
||||
: D(D) {
|
||||
+ Verbose = Args.hasArg(options::OPT_v);
|
||||
RocmPathArg = Args.getLastArgValue(clang::driver::options::OPT_rocm_path_EQ);
|
||||
PrintROCmSearchDirs =
|
||||
Args.hasArg(clang::driver::options::OPT_print_rocm_search_dirs);
|
||||
diff --git a/clang/lib/Driver/ToolChains/ROCm.h b/clang/lib/Driver/ToolChains/ROCm.h
|
||||
--- a/clang/lib/Driver/ToolChains/ROCm.h
|
||||
+++ b/clang/lib/Driver/ToolChains/ROCm.h
|
||||
@@ -110,6 +110,7 @@
|
||||
// Cache ROCm installation search paths.
|
||||
SmallVector<Candidate, 4> ROCmSearchDirs;
|
||||
bool PrintROCmSearchDirs;
|
||||
+ bool Verbose;
|
||||
|
||||
bool allGenericLibsValid() const {
|
||||
return !OCML.empty() && !OCKL.empty() && !OpenCL.empty() && !HIP.empty() &&
|
||||
diff --git a/clang/test/Driver/rocm-detect.hip b/clang/test/Driver/rocm-detect.hip
|
||||
--- a/clang/test/Driver/rocm-detect.hip
|
||||
+++ b/clang/test/Driver/rocm-detect.hip
|
||||
@@ -61,12 +61,15 @@
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefixes=SPACK-SET %s
|
||||
|
||||
// Test invalid SPACK ROCm installation missing hip and rocm-device-libs packages.
|
||||
+// The message about SPACK is emitted only if -v is specified.
|
||||
|
||||
// RUN: rm -rf %T/rocm-spack/hip-*
|
||||
// RUN: rm -rf %T/rocm-spack/rocm-device-libs-*
|
||||
// RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v \
|
||||
// RUN: -target x86_64-linux-gnu --cuda-gpu-arch=gfx900 %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefixes=SPACK-MISS %s
|
||||
+// RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang --version 2>&1 \
|
||||
+// RUN: | FileCheck -check-prefixes=SPACK-MISS-SILENT %s
|
||||
|
||||
// GFX902-DEFAULTLIBS: error: cannot find ROCm device library for gfx902. Provide its path via --rocm-path or --rocm-device-lib-path, or pass -nogpulib to build without ROCm device library
|
||||
|
||||
@@ -90,8 +93,8 @@
|
||||
// SPACK-SAME: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include"
|
||||
|
||||
// SPACK-MULT: InstalledDir: [[DIR:.*]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin
|
||||
-// SPACK-MULT-DAG: Expecting one SPACK package hip-4.0.0 at [[DIR]] but found more
|
||||
-// SPACK-MULT-DAG: Expecting one SPACK package rocm-device-libs-4.0.0 at [[DIR]] but found more
|
||||
+// SPACK-MULT-DAG: Cannot use SPACK package hip-4.0.0 at [[DIR]] due to multiple installations for the same version
|
||||
+// SPACK-MULT-DAG: Cannot use SPACK package rocm-device-libs-4.0.0 at [[DIR]] due to multiple installations for the same version
|
||||
// SPACK-MULT-NOT: Found HIP installation: [[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5, version 4.0.20214-a2917cd
|
||||
// SPACK-MULT-NOT: "-mlink-builtin-bitcode" "[[DIR]]/rocm-device-libs-4.0.0-6wnyzz4hgl3hr7uswasnagt7j2adctbs/amdgcn/bitcode/hip.bc"
|
||||
// SPACK-MULT-NOT: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include"
|
||||
@@ -103,8 +106,12 @@
|
||||
// SPACK-SET-SAME: "-internal-isystem" "[[DIR]]/hip-4.0.0-abcd/include"
|
||||
|
||||
// SPACK-MISS: InstalledDir: [[DIR:.*]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin
|
||||
-// SPACK-MISS-DAG: Expecting SPACK package hip-4.0.0 at [[DIR]] but not found
|
||||
-// SPACK-MISS-DAG: Expecting SPACK package rocm-device-libs-4.0.0 at [[DIR]] but not found
|
||||
+// SPACK-MISS-DAG: SPACK package hip-4.0.0 not found at [[DIR]]
|
||||
+// SPACK-MISS-DAG: SPACK package rocm-device-libs-4.0.0 not found at [[DIR]]
|
||||
// SPACK-MISS-NOT: Found HIP installation: [[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5, version 4.0.20214-a2917cd
|
||||
// SPACK-MISS-NOT: "-mlink-builtin-bitcode" "[[DIR]]/rocm-device-libs-4.0.0-6wnyzz4hgl3hr7uswasnagt7j2adctbs/amdgcn/bitcode/hip.bc"
|
||||
// SPACK-MISS-NOT: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include"
|
||||
+
|
||||
+// SPACK-MISS-SILENT-NOT: SPACK package hip-{{.*}} not found at
|
||||
+// SPACK-MISS-SILENT-NOT: SPACK package rocm-device-libs-{{.*}} not found at
|
||||
+// SPACK-MISS-SILENT-NOT: Found HIP installation
|
|
@ -1,60 +0,0 @@
|
|||
From 0f5e8e4368199ab993470dc4e7df5d91b806c557 Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Tue, 11 Aug 2020 15:06:24 +0200
|
||||
Subject: [PATCH] Use find_library for zlib and ncurses
|
||||
|
||||
find_library makes it easier to use a non-system version of zlib and
|
||||
ncurses, since it respects *_ROOT and CMAKE_PREFIX_PATH.
|
||||
---
|
||||
llvm/cmake/config-ix.cmake | 28 ++++++++++------------------
|
||||
1 file changed, 10 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
|
||||
index 612ce5bdbcb..e748e5ef8c1 100644
|
||||
--- a/llvm/cmake/config-ix.cmake
|
||||
+++ b/llvm/cmake/config-ix.cmake
|
||||
@@ -120,15 +120,11 @@ endif()
|
||||
if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
|
||||
set(HAVE_LIBZ 0)
|
||||
if(LLVM_ENABLE_ZLIB)
|
||||
- foreach(library z zlib_static zlib)
|
||||
- string(TOUPPER ${library} library_suffix)
|
||||
- check_library_exists(${library} compress2 "" HAVE_LIBZ_${library_suffix})
|
||||
- if(HAVE_LIBZ_${library_suffix})
|
||||
- set(HAVE_LIBZ 1)
|
||||
- set(ZLIB_LIBRARIES "${library}")
|
||||
- break()
|
||||
- endif()
|
||||
- endforeach()
|
||||
+ find_library(FIND_ZLIB NAMES z zlib_static zlib)
|
||||
+ if(FIND_ZLIB)
|
||||
+ set(HAVE_LIBZ 1)
|
||||
+ set(ZLIB_LIBRARIES "${FIND_ZLIB}")
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
# Don't look for these libraries on Windows.
|
||||
@@ -141,15 +137,11 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
|
||||
endif()
|
||||
if(LLVM_ENABLE_TERMINFO)
|
||||
set(HAVE_TERMINFO 0)
|
||||
- foreach(library terminfo tinfo curses ncurses ncursesw)
|
||||
- string(TOUPPER ${library} library_suffix)
|
||||
- check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
|
||||
- if(HAVE_TERMINFO_${library_suffix})
|
||||
- set(HAVE_TERMINFO 1)
|
||||
- set(TERMINFO_LIBS "${library}")
|
||||
- break()
|
||||
- endif()
|
||||
- endforeach()
|
||||
+ find_library(FIND_TERMINFO NAMES terminfo tinfo curses ncurses ncursesw)
|
||||
+ if(FIND_TERMINFO)
|
||||
+ set(HAVE_TERMINFO 1)
|
||||
+ set(TERMINFO_LIBS "${FIND_TERMINFO}")
|
||||
+ endif()
|
||||
else()
|
||||
set(HAVE_TERMINFO 0)
|
||||
endif()
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -44,76 +44,6 @@ class LlvmAmdgpu(CMakePackage):
|
|||
version("5.2.0", sha256="0f892174111b78a02d1a00f8f46d9f80b9abb95513a7af38ecf2a5a0882fe87f")
|
||||
version("5.1.3", sha256="d236a2064363c0278f7ba1bb2ff1545ee4c52278c50640e8bb2b9cfef8a2f128")
|
||||
version("5.1.0", sha256="db5d45c4a7842a908527c1b7b8d4a40c688225a41d23cfa382eab23edfffdd10")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="99a14394b406263576ed3d8d10334de7c78d42b349109f375d178b11492eecaf",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="bca2db4aaab71541cac588d6a708fde60f0ebe744809bde8a3847044a1a77413",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="36a4f7dd961cf373b743fc679bdf622089d2a905de2cfd6fd6c9e7ff8d8ad61f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="b71451bf26650ba06c0c5c4c7df70f13975151eaa673ef0cc77c1ab0000ccc97",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="b53c6b13be7d77dc93a7c62e4adbb414701e4e601e1af2d1e98da4ee07c9837f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="1567d349cd3bcd2c217b3ecec2f70abccd5e9248bd2c3c9f21d4cdb44897fc87",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="751eca1d18595b565cfafa01c3cb43efb9107874865a60c80d6760ba83edb661",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="244e38d824fa7dfa8d0edf3c036b3c84e9c17a16791828e4b745a8d31eb374ae",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="aa1f80f429fded465e86bcfaef72255da1af1c5c52d58a4c979bc2f6c2da5a69",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="8262aff88c1ff6c4deb4da5a4f8cda1bf90668950e2b911f93f73edaee53b370",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="1ff14b56d10c2c44d36c3c412b190d3d8cd1bb12cfc7cd58af004c16fd9987d1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="93a28464a4d0c1c9f4ba55e473e5d1cde4c5c0e6d087ec8a0a3aef1f5f5208e8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="3e2542ce54b91b5c841f33d542143e0e43eae95e8785731405af29f08ace725b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="4878fa85473b24d88edcc89938441edc85d2e8a785e567b7bd7ce274ecc2fd9c",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant(
|
||||
"rocm-device-libs",
|
||||
|
@ -136,16 +66,12 @@ class LlvmAmdgpu(CMakePackage):
|
|||
description="Link LLVM tools against the LLVM shared library",
|
||||
)
|
||||
|
||||
provides("libllvm@11", when="@3.5:3.8")
|
||||
provides("libllvm@12", when="@3.9:4.2")
|
||||
provides("libllvm@13", when="@4.3:4.9")
|
||||
provides("libllvm@14", when="@5:5.2")
|
||||
provides("libllvm@15", when="@5.3:5.4")
|
||||
provides("libllvm@16", when="@5.5:5.6")
|
||||
provides("libllvm@17", when="@5.7:")
|
||||
|
||||
depends_on("cmake@3.4.3:", type="build", when="@:3.8")
|
||||
depends_on("cmake@3.13.4:", type="build", when="@3.9.0:")
|
||||
depends_on("cmake@3.13.4:", type="build")
|
||||
depends_on("python", type="build")
|
||||
depends_on("z3", type="link")
|
||||
depends_on("zlib-api", type="link")
|
||||
|
@ -153,19 +79,10 @@ class LlvmAmdgpu(CMakePackage):
|
|||
depends_on("pkgconfig", type="build")
|
||||
|
||||
# openmp dependencies
|
||||
depends_on("perl-data-dumper", type=("build"), when="+openmp")
|
||||
depends_on("perl-data-dumper", type="build", when="+openmp")
|
||||
depends_on("hwloc", when="+openmp")
|
||||
depends_on("elf", type="link", when="+openmp")
|
||||
|
||||
# Will likely only be fixed in LLVM 12 upstream
|
||||
patch("fix-system-zlib-ncurses.patch", when="@3.5.0:3.8.0")
|
||||
patch("fix-ncurses-3.9.0.patch", when="@3.9.0:4.0.0")
|
||||
|
||||
# This is already fixed in upstream but not in 4.2.0 rocm release
|
||||
patch("fix-spack-detection-4.2.0.patch", when="@4.2.0:4.5.2")
|
||||
|
||||
patch("remove-cyclades-inclusion-in-sanitizer.patch", when="@4.2.0:4.5.2")
|
||||
|
||||
# OpenMP clang toolchain looks for bitcode files in llvm/bin/../lib
|
||||
# as per 5.2.0 llvm code. It used to be llvm/bin/../lib/libdevice.
|
||||
# Below patch is to look in the old path.
|
||||
|
@ -208,29 +125,13 @@ class LlvmAmdgpu(CMakePackage):
|
|||
("5.2.0", "901674bc941115c72f82c5def61d42f2bebee687aefd30a460905996f838e16c"),
|
||||
("5.1.3", "c41958560ec29c8bf91332b9f668793463904a2081c330c0d828bf2f91d4f04e"),
|
||||
("5.1.0", "47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f"),
|
||||
("5.0.2", "49cfa8f8fc276ba27feef40546788a2aabe259a924a97af8bef24e295d19aa5e"),
|
||||
("5.0.0", "83ed7aa1c9322b4fc1f57c48a63fc7718eb4195ee6fde433009b4bc78cb363f0"),
|
||||
("4.5.2", "50e9e87ecd6b561cad0d471295d29f7220e195528e567fcabe2ec73838979f61"),
|
||||
("4.5.0", "78412fb10ceb215952b5cc722ed08fa82501b5848d599dc00744ae1bdc196f77"),
|
||||
("4.3.1", "a7291813168e500bfa8aaa5d1dccf5250764ddfe27535def01b51eb5021d4592"),
|
||||
("4.3.0", "055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2"),
|
||||
("4.2.0", "34a2ac39b9bb7cfa8175cbab05d30e7f3c06aaffce99eed5f79c616d0f910f5f"),
|
||||
("4.1.0", "f5f5aa6bfbd83ff80a968fa332f80220256447c4ccb71c36f1fbd2b4a8e9fc1b"),
|
||||
("4.0.0", "d0aa495f9b63f6d8cf8ac668f4dc61831d996e9ae3f15280052a37b9d7670d2a"),
|
||||
("3.10.0", "bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc"),
|
||||
("3.9.0", "c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7"),
|
||||
("3.8.0", "e82cc9a8eb7d92de02cabb856583e28f17a05c8cf9c97aec5275608ef1a38574"),
|
||||
("3.7.0", "b3a114180bf184b3b829c356067bc6a98021d52c1c6f9db6bc57272ebafc5f1d"),
|
||||
("3.5.0", "dce3a4ba672c4a2da4c2260ee4dc96ff6dd51877f5e7e1993cb107372a35a378"),
|
||||
]:
|
||||
resource(
|
||||
name="rocm-device-libs",
|
||||
placement="rocm-device-libs",
|
||||
url="https://github.com/ROCm/ROCm-Device-Libs/archive/rocm-{0}.tar.gz".format(
|
||||
d_version
|
||||
),
|
||||
url=f"https://github.com/ROCm/ROCm-Device-Libs/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
when="@{0} +rocm-device-libs".format(d_version),
|
||||
when=f"@{d_version} +rocm-device-libs",
|
||||
)
|
||||
|
||||
resource(
|
||||
|
@ -253,7 +154,7 @@ class LlvmAmdgpu(CMakePackage):
|
|||
placement="hsa-runtime",
|
||||
url=f"https://github.com/ROCm/ROCR-Runtime/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
resource(
|
||||
name="hsa-runtime",
|
||||
|
@ -276,7 +177,7 @@ class LlvmAmdgpu(CMakePackage):
|
|||
placement="comgr",
|
||||
url=f"https://github.com/ROCm/ROCm-CompilerSupport/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
resource(
|
||||
name="comgr",
|
||||
|
@ -288,44 +189,29 @@ class LlvmAmdgpu(CMakePackage):
|
|||
|
||||
def cmake_args(self):
|
||||
llvm_projects = ["clang", "lld", "clang-tools-extra", "compiler-rt"]
|
||||
llvm_runtimes = []
|
||||
args = []
|
||||
if self.spec.satisfies("@4.3.0:"):
|
||||
args = [
|
||||
self.define("LLVM_ENABLE_Z3_SOLVER", "OFF"),
|
||||
self.define("LLLVM_ENABLE_ZLIB", "ON"),
|
||||
self.define("CLANG_DEFAULT_LINKER", "lld"),
|
||||
self.define("LIBCXX_ENABLE_SHARED", "OFF"),
|
||||
self.define("LIBCXX_ENABLE_STATIC", "ON"),
|
||||
self.define("LIBCXX_INSTALL_LIBRARY", "OFF"),
|
||||
self.define("LIBCXX_INSTALL_HEADERS", "OFF"),
|
||||
self.define("LIBCXXABI_ENABLE_SHARED", "OFF"),
|
||||
self.define("LIBCXXABI_ENABLE_STATIC", "ON"),
|
||||
self.define("LIBCXXABI_INSTALL_STATIC_LIBRARY", "OFF"),
|
||||
]
|
||||
args.append(self.define("LLVM_ENABLE_RTTI", "ON"))
|
||||
if self.spec.satisfies("@4.3.0:4.5.2"):
|
||||
llvm_projects.append("libcxx")
|
||||
llvm_projects.append("libcxxabi")
|
||||
if self.spec.satisfies("@5.0.0:"):
|
||||
llvm_runtimes.append("libcxx")
|
||||
llvm_runtimes.append("libcxxabi")
|
||||
args.append(self.define("LLVM_TARGETS_TO_BUILD", "AMDGPU;X86"))
|
||||
args.append(self.define("LLVM_AMDGPU_ALLOW_NPI_TARGETS", "ON"))
|
||||
args.extend([self.define("LLVM_ENABLE_RUNTIMES", ";".join(llvm_runtimes))])
|
||||
if "+openmp" in self.spec:
|
||||
llvm_projects.append("openmp")
|
||||
llvm_runtimes = ["libcxx", "libcxxabi"]
|
||||
args = [
|
||||
self.define("LLVM_ENABLE_Z3_SOLVER", "OFF"),
|
||||
self.define("LLLVM_ENABLE_ZLIB", "ON"),
|
||||
self.define("CLANG_DEFAULT_LINKER", "lld"),
|
||||
self.define("LIBCXX_ENABLE_SHARED", "OFF"),
|
||||
self.define("LIBCXX_ENABLE_STATIC", "ON"),
|
||||
self.define("LIBCXX_INSTALL_LIBRARY", "OFF"),
|
||||
self.define("LIBCXX_INSTALL_HEADERS", "OFF"),
|
||||
self.define("LIBCXXABI_ENABLE_SHARED", "OFF"),
|
||||
self.define("LIBCXXABI_ENABLE_STATIC", "ON"),
|
||||
self.define("LIBCXXABI_INSTALL_STATIC_LIBRARY", "OFF"),
|
||||
self.define("LLVM_ENABLE_RTTI", "ON"),
|
||||
self.define("LLVM_TARGETS_TO_BUILD", "AMDGPU;X86"),
|
||||
self.define("LLVM_AMDGPU_ALLOW_NPI_TARGETS", "ON"),
|
||||
self.define("LLVM_ENABLE_RUNTIMES", llvm_runtimes),
|
||||
self.define("LLVM_ENABLE_PROJECTS", llvm_projects),
|
||||
self.define("PACKAGE_VENDOR", "AMD"),
|
||||
self.define("CLANG_ENABLE_AMDCLANG", "ON"),
|
||||
]
|
||||
|
||||
args.extend([self.define("LLVM_ENABLE_PROJECTS", ";".join(llvm_projects))])
|
||||
|
||||
if self.spec.satisfies("@4.5.0:"):
|
||||
args.append(self.define("PACKAGE_VENDOR", "AMD"))
|
||||
|
||||
if self.spec.satisfies("@5.0.0:"):
|
||||
args.append(self.define("CLANG_ENABLE_AMDCLANG", "ON"))
|
||||
if self.spec.satisfies("@5.3.0:"):
|
||||
args.append(self.define("LLVM_TARGETS_TO_BUILD", "AMDGPU;X86"))
|
||||
args.append(self.define("LLLVM_AMDGPU_ALLOW_NPI_TARGETS", True))
|
||||
# Enable rocm-device-libs as a external project
|
||||
if "+rocm-device-libs" in self.spec:
|
||||
dir = os.path.join(self.stage.source_path, "rocm-device-libs")
|
||||
|
@ -337,11 +223,11 @@ def cmake_args(self):
|
|||
)
|
||||
|
||||
if "+llvm_dylib" in self.spec:
|
||||
args.append("-DLLVM_BUILD_LLVM_DYLIB:Bool=ON")
|
||||
args.append(self.define("LLVM_BUILD_LLVM_DYLIB", True))
|
||||
|
||||
if "+link_llvm_dylib" in self.spec:
|
||||
args.append("-DLLVM_LINK_LLVM_DYLIB:Bool=ON")
|
||||
args.append("-DCLANG_LINK_CLANG_DYLIB:Bool=ON")
|
||||
args.append(self.define("LLVM_LINK_LLVM_DYLIB", True))
|
||||
args.append(self.define("CLANG_LINK_CLANG_DYLIB", True))
|
||||
|
||||
# Get the GCC prefix for LLVM.
|
||||
if self.compiler.name == "gcc":
|
||||
|
@ -362,25 +248,6 @@ def cmake_args(self):
|
|||
args.append("-DSANITIZER_AMDGPU:Bool=ON")
|
||||
return args
|
||||
|
||||
@run_after("install")
|
||||
def post_install(self):
|
||||
# TODO:Enabling LLVM_ENABLE_RUNTIMES for libcxx,libcxxabi did not build.
|
||||
# bootstraping the libcxx with the just built clang
|
||||
if self.spec.satisfies("@4.5.0:4.5.2"):
|
||||
spec = self.spec
|
||||
define = self.define
|
||||
libcxxdir = "build-bootstrapped-libcxx"
|
||||
with working_dir(libcxxdir, create=True):
|
||||
cmake_args = [
|
||||
self.stage.source_path + "/libcxx",
|
||||
define("CMAKE_C_COMPILER", spec.prefix.bin + "/clang"),
|
||||
define("CMAKE_CXX_COMPILER", spec.prefix.bin + "/clang++"),
|
||||
define("CMAKE_INSTALL_PREFIX", spec.prefix),
|
||||
]
|
||||
cmake_args.extend(self.cmake_args())
|
||||
cmake(*cmake_args)
|
||||
cmake("--build", ".")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, path):
|
||||
match = re.search(r"amdclang", path)
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
From 68d5235cb58f988c71b403334cd9482d663841ab Mon Sep 17 00:00:00 2001
|
||||
From: Tamar Christina <tamar.christina@arm.com>
|
||||
Date: Thu, 20 May 2021 18:55:11 +0100
|
||||
Subject: [PATCH] libsanitizer: Remove cyclades inclusion in sanitizer
|
||||
|
||||
The Linux kernel has removed the interface to cyclades from
|
||||
the latest kernel headers[1] due to them being orphaned for the
|
||||
past 13 years.
|
||||
|
||||
libsanitizer uses this header when compiling against glibc, but
|
||||
glibcs itself doesn't seem to have any references to cyclades.
|
||||
|
||||
Further more it seems that the driver is broken in the kernel and
|
||||
the firmware doesn't seem to be available anymore.
|
||||
|
||||
As such since this is breaking the build of libsanitizer (and so the
|
||||
GCC bootstrap[2]) I propose to remove this.
|
||||
|
||||
[1] https://lkml.org/lkml/2021/3/2/153
|
||||
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379
|
||||
|
||||
Reviewed By: eugenis
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D102059
|
||||
---
|
||||
.../sanitizer_common_interceptors_ioctl.inc | 9 ---------
|
||||
.../sanitizer_platform_limits_posix.cpp | 11 -----------
|
||||
.../sanitizer_platform_limits_posix.h | 10 ----------
|
||||
3 files changed, 30 deletions(-)
|
||||
|
||||
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
|
||||
index 7f181258eab52..b7da659875574 100644
|
||||
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
|
||||
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
|
||||
@@ -370,15 +370,6 @@ static void ioctl_table_fill() {
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
// _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
|
||||
- _(CYGETDEFTHRESH, WRITE, sizeof(int));
|
||||
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
|
||||
- _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
|
||||
- _(CYGETTHRESH, WRITE, sizeof(int));
|
||||
- _(CYGETTIMEOUT, WRITE, sizeof(int));
|
||||
- _(CYSETDEFTHRESH, NONE, 0);
|
||||
- _(CYSETDEFTIMEOUT, NONE, 0);
|
||||
- _(CYSETTHRESH, NONE, 0);
|
||||
- _(CYSETTIMEOUT, NONE, 0);
|
||||
_(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
|
||||
_(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
|
||||
_(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
|
||||
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
index 35a690cba5c83..6e5c330b98eff 100644
|
||||
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
@@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t;
|
||||
# include <sys/procfs.h>
|
||||
#endif
|
||||
#include <sys/user.h>
|
||||
-#include <linux/cyclades.h>
|
||||
#include <linux/if_eql.h>
|
||||
#include <linux/if_plip.h>
|
||||
#include <linux/lp.h>
|
||||
@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
|
||||
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
|
||||
#if EV_VERSION > (0x010000)
|
||||
unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
|
||||
#else
|
||||
@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
|
||||
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
|
||||
- unsigned IOCTL_CYGETMON = CYGETMON;
|
||||
- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
|
||||
- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
|
||||
- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
|
||||
- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
|
||||
- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
|
||||
- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
|
||||
unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
|
||||
unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
|
||||
unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
|
||||
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
index 836b178c131ba..8a156b7fcb80a 100644
|
||||
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz;
|
||||
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
extern unsigned struct_ax25_parms_struct_sz;
|
||||
-extern unsigned struct_cyclades_monitor_sz;
|
||||
extern unsigned struct_input_keymap_entry_sz;
|
||||
extern unsigned struct_ipx_config_data_sz;
|
||||
extern unsigned struct_kbdiacrs_sz;
|
||||
@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE;
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
-extern unsigned IOCTL_CYGETDEFTHRESH;
|
||||
-extern unsigned IOCTL_CYGETDEFTIMEOUT;
|
||||
-extern unsigned IOCTL_CYGETMON;
|
||||
-extern unsigned IOCTL_CYGETTHRESH;
|
||||
-extern unsigned IOCTL_CYGETTIMEOUT;
|
||||
-extern unsigned IOCTL_CYSETDEFTHRESH;
|
||||
-extern unsigned IOCTL_CYSETDEFTIMEOUT;
|
||||
-extern unsigned IOCTL_CYSETTHRESH;
|
||||
-extern unsigned IOCTL_CYSETTIMEOUT;
|
||||
extern unsigned IOCTL_EQL_EMANCIPATE;
|
||||
extern unsigned IOCTL_EQL_ENSLAVE;
|
||||
extern unsigned IOCTL_EQL_GETMASTRCFG;
|
|
@ -38,90 +38,11 @@ class Migraphx(CMakePackage):
|
|||
version("5.2.0", sha256="33afcdf52c6e0e3a2f939fcf30e87f712b8e8ef3633a3dc03a19fea359704925")
|
||||
version("5.1.3", sha256="686e068774500a46b6e6488370bbf5bd0bba6d19ecdb00636f951704d19c9ef2")
|
||||
version("5.1.0", sha256="6398efaef18a74f2a475aa21bd34bc7c077332a430ee3f6ba4fde6e6a6aa9f89")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="3ef48ac03b909d1a1aa1f91f365ce64af2ce66635b6efb5ad0b207dc51ff2fd6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="779a91ccfa4c2576251189f0c646ff7707c3646319c7d5dd137872beb52d2953",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="ecfd9a8e7967076f056d5b6a90b22f8919b82226443769b181193f16ebf58b83",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="8d243a48406af7f960c03bc28a16fad931de8e008ae848799adae504cc5f1355",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="e0b04da37aed937a2b2218059c189559a15460c191b5e9b00c7366c81c90b06e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="99cf202a5e86cf5502b0f8bf12f152dbd5a6aacc204b3d9d5efca67a54793408",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="93f22f6c641dde5d7fb8abcbd99621b3c81e332e125a6f3a258d5e4cf2055f55",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="f9b1d2e25cdbaf5d0bfb07d4c8ccef0abaa291757c4bce296c3b5b9488174045",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="b8b845249626e9169353dbfa2530db468972a7569b248c8118ff19e029a12e55",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="eda22b9af286afb7806e6b5d5ebb0d612dce87c9bad64ba5176fda1c2ed9c9b7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="7649689e06522302c07b39abb88bdcc3d4de18a7559d4f6a9e238e92b2074032",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="08fa991349a2b95364b0a69be7960580c3e3fde2fda0f0c67bc41429ea2d67a0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="697c3c7babaa025eaabec630dbd8a87d10dc4fe35fafa3b0d3463aaf1fc46399",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="5766f3b262468c500be5051a056811a8edfa741734a5c08c4ecb0337b7906377",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = "https://github.com/ROCm/AMDMIGraphX/archive/"
|
||||
if version <= Version("3.5.0"):
|
||||
url += "{0}.tar.gz".format(version)
|
||||
else:
|
||||
url += "rocm-{0}.tar.gz".format(version)
|
||||
|
||||
return url
|
||||
|
||||
patch("0001-Adding-nlohmann-json-include-directory.patch", when="@3.9.0:5.5")
|
||||
patch("0001-Adding-nlohmann-json-include-directory.patch", when="@:5.5")
|
||||
# Restrict Python 2.7 usage to fix the issue below
|
||||
# https://github.com/spack/spack/issues/24429
|
||||
patch("0002-restrict-python-2.7-usage.patch", when="@3.9.0:5.1.3")
|
||||
patch("0002-restrict-python-2.7-usage.patch", when="@:5.1")
|
||||
patch("0003-restrict-python-2.7-usage.patch", when="@5.2.0:5.4")
|
||||
patch("0004-restrict-python2.7-usage-for-5.5.0.patch", when="@5.5.0")
|
||||
patch("0005-Adding-half-include-directory-path-migraphx.patch", when="@5.6.0:")
|
||||
|
@ -135,26 +56,11 @@ def url_for_version(self, version):
|
|||
depends_on("half@1.12.0", type="link", when="@:5.5")
|
||||
depends_on("half@2:", when="@5.6:")
|
||||
depends_on("python@3.5:", type="build")
|
||||
depends_on("py-pybind11", type="build", when="@:4.0.0")
|
||||
depends_on("py-pybind11@2.6:", type="build", when="@4.1.0:")
|
||||
depends_on("pkgconfig", type="build", when="@5.3.0:")
|
||||
depends_on("abseil-cpp")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -173,14 +79,14 @@ def url_for_version(self, version):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on("rocblas@" + ver, when="@" + ver)
|
||||
depends_on("miopen-hip@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocblas@{ver}", when=f"@{ver}")
|
||||
depends_on(f"miopen-hip@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("composable-kernel@" + ver, when="@" + ver)
|
||||
depends_on(f"composable-kernel@{ver}", when=f"@{ver}")
|
||||
|
||||
@property
|
||||
def cmake_python_hints(self):
|
||||
|
@ -204,11 +110,10 @@ def determine_version(cls, lib):
|
|||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
abspath = spec["abseil-cpp"].prefix.include
|
||||
args = ["-DCMAKE_CXX_COMPILER={0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix)]
|
||||
if "@3.9.0:" in self.spec:
|
||||
args.append(
|
||||
"-DNLOHMANN_JSON_INCLUDE={0}".format(self.spec["nlohmann-json"].prefix.include)
|
||||
)
|
||||
args = [
|
||||
self.define("CMAKE_CXX_COMPILER", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++"),
|
||||
self.define("NLOHMANN_JSON_INCLUDE", self.spec["nlohmann-json"].prefix.include),
|
||||
]
|
||||
if self.spec["cmake"].satisfies("@3.16.0:"):
|
||||
args += self.cmake_python_hints
|
||||
if "@5.5.0:" in self.spec:
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 985f59f..515e7e0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -184,7 +184,8 @@ string(REGEX REPLACE --cuda-gpu-arch=[a-z0-9]+ "" HIP_COMPILER_FLAGS "${HIP_COMP
|
||||
message(STATUS "Hip compiler flags: ${HIP_COMPILER_FLAGS}")
|
||||
|
||||
add_definitions("-DHIP_COMPILER_FLAGS=${HIP_COMPILER_FLAGS}")
|
||||
-
|
||||
+add_definitions("--rocm-path=${HIP_PREFIX_PATH}")
|
||||
+add_definitions("--rocm-device-lib-path=${DEVICELIBS_PREFIX_PATH}")
|
||||
|
||||
|
||||
# HIP
|
|
@ -39,76 +39,6 @@ class MiopenHip(CMakePackage):
|
|||
version("5.2.0", sha256="5fda69426e81df9f8fb6658e579176b9c4fcce3516fc8488d3cfd2b6f6f2b3b4")
|
||||
version("5.1.3", sha256="510461f5c5bdbcf8dc889099d1e5960b9f84bd845a9fc9154588a9898c701c1d")
|
||||
version("5.1.0", sha256="bb50201334d68addf153b84b88ab803027c4913d71bdbda6f5ccde3f672f6fdd")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="e73c18c6e0791d6ca8958508d899072ce12fc6c27cf78792d0c2a5c7e34427be",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="4a46a2bdd11a2597c83cdb0c5e208b81728fab2ff7c585dabfca5aa05ee7a4f7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="cb49bdf215ed9881755239b6312d72f829c1a0edf510e6d1fbb206c41f5406fc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="be2f5ce962e15e62d427978422498c0ddf821b91fd40777a1ba915a2794d6fda",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="1fb2fd8b24f984174ec5338a58b7964e128b74dafb101373a41c8ed33955251a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="034445470cfd44480a1d9854f9fdfe92cfb8efa3f002dee508eb9585e338486d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="8ab02e784c8b3471159794766ed6303c333b33c69dc5186c0930e56504373b7c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="068b1bc33f90fe21d3aab5697d2b3b7b930e613c54d6c5ee820768579b2b41ee",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="84c6c17be9c1a9cd0d3a2af283433f64b07a4b9941349f498e40fed82fb205a6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="926e43c5583cf70d6b247f9fe45971b8b1cc9668f9c8490c142c7e8b6e268f1a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="f57d75a220c1094395cc1dccab2185c759d779751ddbb5369a6f041ec77b2156",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="612b30d4a967bf18c7fa7aa3ef12ed558314ed04cee2775b842bf6a96cd7276f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="f6a6ddd8d39bb76b7f7d91e68ade3b45e0201181145658c43b967065a354b103",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="aa362e69c4dce7f5751f0ee04c745735ea5454c8101050e9b92cc60fa3c0fb82",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
depends_on("pkgconfig", type="build")
|
||||
|
@ -121,9 +51,8 @@ class MiopenHip(CMakePackage):
|
|||
depends_on("bzip2")
|
||||
depends_on("sqlite")
|
||||
depends_on("half")
|
||||
depends_on("zlib-api", when="@3.9.0:")
|
||||
depends_on("zlib-api")
|
||||
|
||||
patch("0001-Add-rocm-path-and-rocm-device-lib-path-flags.patch", when="@3.9.0:5.0.2")
|
||||
patch("miopen-hip-include-nlohmann-include-directory.patch", when="@5.4.0:")
|
||||
patch(
|
||||
"https://github.com/ROCm/MIOpen/pull/2276/commits/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1",
|
||||
|
@ -132,20 +61,6 @@ class MiopenHip(CMakePackage):
|
|||
)
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -164,34 +79,27 @@ class MiopenHip(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocm-clang-ocl@" + ver, when="@" + ver)
|
||||
depends_on("rocblas@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-clang-ocl@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocblas@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3"]:
|
||||
depends_on("mlirmiopen@" + ver, when="@" + ver)
|
||||
depends_on(f"mlirmiopen@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("nlohmann-json", type="link")
|
||||
depends_on("composable-kernel@" + ver, when="@" + ver)
|
||||
depends_on(f"composable-kernel@{ver}", when=f"@{ver}")
|
||||
for ver in ["5.4.0", "5.4.3", "5.5.0"]:
|
||||
depends_on("nlohmann-json", type="link")
|
||||
depends_on("rocmlir@" + ver, when="@" + ver)
|
||||
depends_on(f"rocmlir@{ver}", when=f"@{ver}")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
if "@3.9.0:" in self.spec:
|
||||
lib_dir = self.spec["zlib-api"].libs.directories[0]
|
||||
env.prepend_path("LIBRARY_PATH", lib_dir)
|
||||
lib_dir = self.spec["zlib-api"].libs.directories[0]
|
||||
env.prepend_path("LIBRARY_PATH", lib_dir)
|
||||
|
||||
def get_bitcode_dir(self):
|
||||
spec = self.spec
|
||||
|
||||
# and the exact location of its bitcode depends on the version
|
||||
if spec.version >= Version("3.9.0"):
|
||||
return spec["llvm-amdgpu"].prefix.amdgcn.bitcode
|
||||
else:
|
||||
return spec["llvm-amdgpu"].prefix.lib
|
||||
return self.spec["llvm-amdgpu"].prefix.amdgcn.bitcode
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
|
|
|
@ -34,76 +34,6 @@ class MiopenOpencl(CMakePackage):
|
|||
version("5.2.0", sha256="5fda69426e81df9f8fb6658e579176b9c4fcce3516fc8488d3cfd2b6f6f2b3b4")
|
||||
version("5.1.3", sha256="510461f5c5bdbcf8dc889099d1e5960b9f84bd845a9fc9154588a9898c701c1d")
|
||||
version("5.1.0", sha256="bb50201334d68addf153b84b88ab803027c4913d71bdbda6f5ccde3f672f6fdd")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="e73c18c6e0791d6ca8958508d899072ce12fc6c27cf78792d0c2a5c7e34427be",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="4a46a2bdd11a2597c83cdb0c5e208b81728fab2ff7c585dabfca5aa05ee7a4f7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="cb49bdf215ed9881755239b6312d72f829c1a0edf510e6d1fbb206c41f5406fc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="be2f5ce962e15e62d427978422498c0ddf821b91fd40777a1ba915a2794d6fda",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="1fb2fd8b24f984174ec5338a58b7964e128b74dafb101373a41c8ed33955251a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="034445470cfd44480a1d9854f9fdfe92cfb8efa3f002dee508eb9585e338486d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="8ab02e784c8b3471159794766ed6303c333b33c69dc5186c0930e56504373b7c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="068b1bc33f90fe21d3aab5697d2b3b7b930e613c54d6c5ee820768579b2b41ee",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="84c6c17be9c1a9cd0d3a2af283433f64b07a4b9941349f498e40fed82fb205a6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="926e43c5583cf70d6b247f9fe45971b8b1cc9668f9c8490c142c7e8b6e268f1a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="f57d75a220c1094395cc1dccab2185c759d779751ddbb5369a6f041ec77b2156",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="612b30d4a967bf18c7fa7aa3ef12ed558314ed04cee2775b842bf6a96cd7276f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="f6a6ddd8d39bb76b7f7d91e68ade3b45e0201181145658c43b967065a354b103",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="aa362e69c4dce7f5751f0ee04c745735ea5454c8101050e9b92cc60fa3c0fb82",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
depends_on("boost@1.67.0:1.73.0", type="link")
|
||||
|
@ -116,26 +46,8 @@ class MiopenOpencl(CMakePackage):
|
|||
depends_on("bzip2", type="link")
|
||||
depends_on("sqlite", type="link")
|
||||
depends_on("half", type="build")
|
||||
depends_on("miopengemm@1.1.6", type="link", when="@3.5.0")
|
||||
|
||||
for ver in ["3.5.0"]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("rocm-opencl@" + ver, when="@" + ver)
|
||||
|
||||
for ver in [
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -147,17 +59,17 @@ class MiopenOpencl(CMakePackage):
|
|||
"5.5.0",
|
||||
"5.5.1",
|
||||
]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("rocm-opencl@" + ver, when="@" + ver)
|
||||
depends_on("miopengemm@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"rocm-opencl@{ver}", when=f"@{ver}")
|
||||
depends_on(f"miopengemm@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3"]:
|
||||
depends_on("mlirmiopen@" + ver, when="@" + ver)
|
||||
depends_on(f"mlirmiopen@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
|
||||
depends_on("nlohmann-json", type="link")
|
||||
depends_on("rocblas", type="link")
|
||||
depends_on("rocmlir@" + ver, when="@" + ver)
|
||||
depends_on(f"rocmlir@{ver}", when=f"@{ver}")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
|
@ -171,7 +83,7 @@ def determine_version(cls, lib):
|
|||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
return [
|
||||
self.define("MIOPEN_BACKEND", "OpenCL"),
|
||||
self.define(
|
||||
"MIOPEN_HIP_COMPILER", "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix)
|
||||
|
@ -182,6 +94,5 @@ def cmake_args(self):
|
|||
self.define(
|
||||
"MIOPEN_AMDGCN_ASSEMBLER", "{0}/bin/clang".format(self.spec["llvm-amdgpu"].prefix)
|
||||
),
|
||||
self.define("Boost_USE_STATIC_LIBS", "Off"),
|
||||
self.define("Boost_USE_STATIC_LIBS", False),
|
||||
]
|
||||
return args
|
||||
|
|
|
@ -21,26 +21,6 @@ class MiopenTensile(CMakePackage):
|
|||
libraries = ["libMIOpenTensile"]
|
||||
|
||||
version("5.1.0", sha256="f1ae57bd4df8c154357b3f17caf0cfd5f80ba16ffff67bf6219a56f1eb5f897d")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="7b85a6a37d0905b0a3baa8361fd71a5a32ad90f3a562fd5e1af7e2ba68099fa6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="276ada52e2e8431851296a60df538e0171f8a1c4e9894de8954ffa9306cda2d8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="eae14b20aec5ad57815c85d0571b7aecc3704696147f3cdbe34287e88da0c9e9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="5f181f536040c0612bf889600f75951e7ec031ae5c4cb9c2c44f6ac3b15b004b",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
tensile_architecture = ("all", "gfx906", "gfx908", "gfx803", "gfx900")
|
||||
|
||||
|
@ -74,14 +54,13 @@ class MiopenTensile(CMakePackage):
|
|||
name="Tensile",
|
||||
git="https://github.com/ROCm/Tensile.git",
|
||||
commit="9cbabb07f81e932b9c98bf5ae48fbd7fcef615cf",
|
||||
when="@4.5.0:",
|
||||
)
|
||||
|
||||
for ver in ["4.5.0", "4.5.2", "5.0.0", "5.0.2", "5.1.0"]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, when="@" + ver)
|
||||
for ver in ["5.1.0"]:
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", when=f"@{ver}")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("CXX", self.spec["hip"].hipcc)
|
||||
|
@ -90,12 +69,10 @@ def setup_build_environment(self, env):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
arch = self.spec.variants["tensile_architecture"].value
|
||||
|
|
|
@ -40,95 +40,10 @@ def url_for_version(self, version):
|
|||
version("5.2.0", sha256="10458fb07b56a7fbe165595d588b7bf5f1300c57bda2f3133c3687c7bae39ea8")
|
||||
version("5.1.3", sha256="c70fc9e2a6d47356a612e24f5757bf16fdf26e671bd53a0975c1a0978da740b6")
|
||||
version("5.1.0", sha256="e2b20cdc20a745bcb7a554852e6b4bd39274c7dcc13fc19a81a282fb4dfa475f")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="64a6bf7c902af63d85563e29361763e9daa1fd3699490a91c222b057673612cc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="122cfb4e79476092e84f73f48540701c90fb87e0dc20cdf39f202d92e9ff5544",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="e778e0ccb123cd637ac459b2aecdf0fdead158580479bc0adfc9a28879e1d1c9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="54ec908109a91f9022b61e63e3a1b9706cdcf133ba6fb3b39a65ca0e79be7747",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="0aee2281d9b8c625e9bda8efff3067237d6155a53f6c720dcb4e3b3ec8bf8d14",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="d32b3b98e695b7db2fd2faa6587a57728d1252d6d649dcb2db3102f98cd5930e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="a11fa063248ed339fe897ab4c5d338b7279035fa37fcbe0909e2c4c352aaefb1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="389328eb4a16565853691bd5b01a0eab978d99e3217329236ddc63a38b8dd4eb",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="366d03facb1ec5f6f4894aa88859df1d7fea00fee0cbac5173d7577e9a8ba799",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="66d844a17729ab25c1c2a243667d9714eb89fd51e42bfc014e2faf54a8642064",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="8e1273c35d50e9fd92e303d9bcbdd42ddbfda20844b3248428e16b54928f6dc2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="d76f5b4b3b9d1e3589a92f667f39eab5b5ab54ec3c4e04d412035be3ec623547",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="392b280ca564b120f6b24ec1fe8782cba08a8a5fb52938e8bc3dc887d3fd08fa",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.1.6",
|
||||
sha256="9ab04903794c6a59432928eaec92c687d51e2b4fd29630cf227cbc49d56dc69b",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("rocm-cmake@3.5.0", type="build", when="@1.1.6")
|
||||
depends_on("rocm-opencl@3.5.0", when="@1.1.6")
|
||||
|
||||
for ver in [
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -141,8 +56,8 @@ def url_for_version(self, version):
|
|||
"5.5.0",
|
||||
"5.5.1",
|
||||
]:
|
||||
depends_on("rocm-cmake@" + ver, type="build", when="@" + ver)
|
||||
depends_on("rocm-opencl@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"rocm-opencl@{ver}", when=f"@{ver}")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
|
|
|
@ -44,76 +44,6 @@ def url_for_version(self, version):
|
|||
version("5.2.0", sha256="fee620a1edd3bce18b2cec9ef26ec2afe0a85d6da8a37ed713ab0d1342382503")
|
||||
version("5.1.3", sha256="62591d5caedc13832c3ccef629a88d9c2a43c884daad1124ddcb9c5f7d5470e9")
|
||||
version("5.1.0", sha256="e082415cc2fb859c53a6d6e5d72ca4529f6b4d56a4abe274dc374faaa5910513")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="da730c2347b7f2d0cb7a262f8305750988f18e9f1eb206cf297bacaab2f6b408",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="935113feb71eced2b5f21fffc2a90a188b4ef2fe009c50f0445504cb27fbc58c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="26fd7fbd2e319bf4a8657900ad2f81bba1ae66745c2ba95f2f87e33903cfe69c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="518834893d3fcdb7ecff179b3f3992ca1aacb30b6d95711c74918abb6f80b925",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="d77d63c0f148870dcd2a39a823e94b28adef9e84d2c37dfc3b05db5de4d7af83",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="31f6ab9fb7f40b23d4b24c9a70f809623720943e0492c3d357dd22dcfa50efb2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="172857b1b340373ae81ed6aa241559aa781e32250e75c82d7ba3c002930a8a3a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="0b431a49807682b9a81adac6a64160a0712ddaa3963e0f05595c93b92be777ea",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="e09d4890b729740ded056b3974daea84c8eb1fc93714c52bf89f853c2eef1fb5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="8a67fae77a05ef60a501e64a572a7bd2ccb9243518b1414112ccd1d1f78d08c8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="892812cc6e6977ed8cd4b69c63f4c17be43b83c78eeafd9549236c17f6eaa2af",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="4e177a9b5dcae671d6ea9f0686cf5f73fcd1e3feb3c50425c8c6d43ac5d77feb",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="3ce13c6449739c653139fc121411d94eaa9d764d3d339c4c78fab4b8aa199965",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.7",
|
||||
sha256="ff77142fd4d4a93136fd0ac17348861f10e8f5d5f656fa9dacee08d8fcd2b1d8",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# Adding 2 variants OPENCL ,HIP which HIP as default. earlier to 5.0.0,OPENCL
|
||||
# was the default but has change dto HIP from 5.0.0 onwards.
|
||||
|
@ -123,6 +53,7 @@ def url_for_version(self, version):
|
|||
variant("opencl", default=False, description="Use OPENCL as the backend")
|
||||
variant("hip", default=True, description="Use HIP as backend")
|
||||
variant("add_tests", default=False, description="add tests and samples folder")
|
||||
|
||||
patch("0001-add-half-include-path.patch", when="@5.5")
|
||||
patch("0001-add-half-include-path-5.6.patch", when="@5.6:")
|
||||
patch("0002-add-half-include-path-for-tests.patch", when="@5.5: +add_tests")
|
||||
|
@ -137,141 +68,128 @@ def url_for_version(self, version):
|
|||
conflicts("+add_tests", when="@:5.4")
|
||||
|
||||
def patch(self):
|
||||
if self.spec.satisfies("@4.2.0"):
|
||||
if self.spec.satisfies("@:5.1 + hip"):
|
||||
filter_file(
|
||||
"${ROCM_PATH}/opencl",
|
||||
self.spec["rocm-opencl"].prefix,
|
||||
"amd_openvx/cmake/FindOpenCL.cmake",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"/opt/rocm/mivisionx/include",
|
||||
self.spec["mivisionx"].prefix.include,
|
||||
"utilities/mv_deploy/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
if self.spec.satisfies("@4.5.0:5.1 + hip"):
|
||||
filter_file(
|
||||
"${ROCM_PATH}/miopen",
|
||||
r"${ROCM_PATH}/miopen",
|
||||
self.spec["miopen-hip"].prefix.miopen,
|
||||
"amd_openvx_extensions/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/bin",
|
||||
r"${ROCM_PATH}/bin",
|
||||
self.spec["hip"].prefix.bin,
|
||||
"amd_openvx/openvx/hipvx/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/bin",
|
||||
r"${ROCM_PATH}/bin",
|
||||
self.spec["hip"].prefix.bin,
|
||||
"amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
if self.spec.satisfies("@5.1.3: + hip"):
|
||||
filter_file(
|
||||
"${ROCM_PATH}/include/miopen/config.h",
|
||||
r"${ROCM_PATH}/include/miopen/config.h",
|
||||
"{0}/include/miopen/config.h".format(self.spec["miopen-hip"].prefix),
|
||||
"amd_openvx_extensions/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
if self.spec.satisfies("@5.1.3: + opencl"):
|
||||
filter_file(
|
||||
"${ROCM_PATH}/include/miopen/config.h",
|
||||
r"${ROCM_PATH}/include/miopen/config.h",
|
||||
"{0}/include/miopen/config.h".format(self.spec["miopen-opencl"].prefix),
|
||||
"amd_openvx_extensions/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
if self.spec.satisfies("@5.3.0: + hip"):
|
||||
filter_file(
|
||||
"${ROCM_PATH}/llvm/bin/clang++",
|
||||
r"${ROCM_PATH}/llvm/bin/clang++",
|
||||
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
|
||||
"amd_openvx/openvx/hipvx/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/llvm/bin/clang++",
|
||||
r"${ROCM_PATH}/llvm/bin/clang++",
|
||||
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
|
||||
"amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
if self.spec.satisfies("@5.5.0: + hip"):
|
||||
filter_file(
|
||||
"${ROCM_PATH}/llvm/bin/clang++",
|
||||
r"${ROCM_PATH}/llvm/bin/clang++",
|
||||
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
|
||||
"rocAL/rocAL/rocAL_hip/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
if self.spec.satisfies("+add_tests"):
|
||||
filter_file(
|
||||
"${ROCM_PATH}/include/mivisionx",
|
||||
r"${ROCM_PATH}/include/mivisionx",
|
||||
"{0}/include/mivisionx".format(self.spec.prefix),
|
||||
"tests/amd_migraphx_tests/mnist/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/lib",
|
||||
r"${ROCM_PATH}/lib",
|
||||
"{0}/lib".format(self.spec.prefix),
|
||||
"tests/amd_migraphx_tests/mnist/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/include/mivisionx",
|
||||
r"${ROCM_PATH}/include/mivisionx",
|
||||
"{0}/include/mivisionx".format(self.spec.prefix),
|
||||
"tests/amd_migraphx_tests/resnet50/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/lib",
|
||||
r"${ROCM_PATH}/lib",
|
||||
"{0}/lib".format(self.spec.prefix),
|
||||
"tests/amd_migraphx_tests/resnet50/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/include/mivisionx",
|
||||
r"${ROCM_PATH}/include/mivisionx",
|
||||
"{0}/include/mivisionx".format(self.spec.prefix),
|
||||
"samples/inference/mv_objdetect/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/lib",
|
||||
r"${ROCM_PATH}/lib",
|
||||
"{0}/lib".format(self.spec.prefix),
|
||||
"samples/inference/mv_objdetect/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/include/mivisionx",
|
||||
r"${ROCM_PATH}/include/mivisionx",
|
||||
"{0}/include/mivisionx".format(self.spec.prefix),
|
||||
"model_compiler/python/nnir_to_clib.py",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"/opt/rocm",
|
||||
r"/opt/rocm",
|
||||
"{0}".format(self.spec.prefix),
|
||||
"model_compiler/python/nnir_to_clib.py",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal",
|
||||
r"${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal",
|
||||
"{0}/include/mivisionx/rocal".format(self.spec.prefix),
|
||||
"utilities/rocAL/rocAL_unittests/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/lib",
|
||||
r"${ROCM_PATH}/lib",
|
||||
"{0}/lib".format(self.spec.prefix),
|
||||
"utilities/rocAL/rocAL_unittests/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal",
|
||||
r"${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal",
|
||||
"{0}/include/mivisionx/rocal".format(self.spec.prefix),
|
||||
"utilities/rocAL/rocAL_video_unittests/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_PATH}/lib",
|
||||
r"${ROCM_PATH}/lib",
|
||||
"{0}/lib".format(self.spec.prefix),
|
||||
"utilities/rocAL/rocAL_video_unittests/CMakeLists.txt",
|
||||
string=True,
|
||||
|
@ -295,11 +213,7 @@ def patch(self):
|
|||
type="build",
|
||||
when="@5.3:",
|
||||
)
|
||||
depends_on("rocm-opencl@3.5.0", when="@1.7+opencl")
|
||||
depends_on("rocm-cmake@3.5.0", type="build", when="@1.7")
|
||||
depends_on("miopen-opencl@3.5.0", when="@1.7+opencl")
|
||||
depends_on("miopengemm@1.1.6", when="@1.7+opencl")
|
||||
depends_on("openssl", when="@4.0.0:")
|
||||
depends_on("openssl")
|
||||
depends_on("libjpeg-turbo@2.0.6+partial_decoder", type="build")
|
||||
depends_on("rpp", when="@5.5:")
|
||||
depends_on("lmdb", when="@5.5:")
|
||||
|
@ -313,7 +227,6 @@ def patch(self):
|
|||
depends_on("py-pytz", when="+add_tests")
|
||||
depends_on("rapidjson", when="@5.7:")
|
||||
|
||||
conflicts("^cmake@3.22:", when="@:5.0.0")
|
||||
# need to choose atleast one backend and both cannot be set
|
||||
# HIP as backend did not build for older releases 5.1.0 where
|
||||
# OPENCL was default backend.
|
||||
|
@ -322,19 +235,6 @@ def patch(self):
|
|||
|
||||
with when("+opencl"):
|
||||
for ver in [
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -347,15 +247,11 @@ def patch(self):
|
|||
"5.5.0",
|
||||
"5.5.1",
|
||||
]:
|
||||
depends_on("rocm-opencl@" + ver, when="@" + ver)
|
||||
depends_on("miopengemm@" + ver, when="@" + ver)
|
||||
depends_on("miopen-opencl@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-opencl@{ver}", when=f"@{ver}")
|
||||
depends_on(f"miopengemm@{ver}", when=f"@{ver}")
|
||||
depends_on(f"miopen-opencl@{ver}", when=f"@{ver}")
|
||||
with when("+hip"):
|
||||
for ver in [
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -374,7 +270,7 @@ def patch(self):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("miopen-hip@" + ver, when="@" + ver)
|
||||
depends_on(f"miopen-hip@{ver}", when=f"@{ver}")
|
||||
for ver in [
|
||||
"5.3.3",
|
||||
"5.4.0",
|
||||
|
@ -388,11 +284,11 @@ def patch(self):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("migraphx@" + ver, when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on(f"migraphx@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
depends_on("python@3.5:", type="build")
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3bd1ce0..dc72b16 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -80,6 +80,8 @@ include_directories(src)
|
||||
include_directories(src/include)
|
||||
include_directories(src/collectives)
|
||||
include_directories(src/collectives/device)
|
||||
+include_directories(${NUMACTL_DIR}/include)
|
||||
+link_directories(${NUMACTL_DIR}/lib)
|
||||
|
||||
set(CU_SOURCES
|
||||
src/collectives/device/all_reduce.cu
|
|
@ -39,76 +39,6 @@ class Rccl(CMakePackage):
|
|||
version("5.2.0", sha256="6ee3a04da0d16eb53f768a088633a7d8ecc4416a2d0c07f7ba8426ab7892b060")
|
||||
version("5.1.3", sha256="56491257f27b48bf85f4b91434a2a6e49a448337c889db181b02c8a4a260a4bc")
|
||||
version("5.1.0", sha256="02b0180857e615326f9cab775573436b9162899ad8e526830f54392b8a51b1f5")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="a2377ad2332b93d3443a8ee74f4dd9f965ae8cbbfad473f8f57ca17905389a39",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="80eb70243f11b80e215458a67c278cd5a655f6e486289962b92ba3504e50af5c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="36de0d3f3ffad491758d89c208ef72c5be5e0db766053a9c766e9c5c6a33a487",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="f806f9f65c490abddc562cb4812e12701582bbb449e41cc4797d00e0dedf084e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="c5db71423dc654e8d2c3111e142e65c89436bc636827d95d41a09a87f44fe246",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="b5231d8c5ab034a583feceebcef68d0cc0b05ec5a683f802fc7747c89f27d5f6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="2829fae40ebc1d8be201856d2193a941c87e9cf38dca0a2f4414e675c1742f20",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="88ec9b43c31cb054fe6aa28bcc0f4b510213635268f951939d6980eee5bb3680",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="0632a15b3d6b5981c05377cf4aeb51546f4c4901fd7c37fb0c98071851ad531a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="d9dd0b0d8b9d056fc5e6c7b814520800190952acd30dac3a7c462c4cb6f42bb3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="ff9d03154d668093309ff814a33788f2cc093b3c627e78e42ae246e6017408b0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="0b6676d06bdb1f65d511a95db9f842a3443def83d75759dfdf812b5e62d8c910",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="8273878ff71aac2e7adf5cc8562d2933034c6c6b3652f88fbe3cd4f2691036e3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="290b57a66758dce47d0bfff3f5f8317df24764e858af67f60ddcdcadb9337253",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
||||
|
@ -119,64 +49,15 @@ class Rccl(CMakePackage):
|
|||
sticky=True,
|
||||
)
|
||||
|
||||
patch("0001-Fix-numactl-path-issue.patch", when="@3.7.0:4.3.2")
|
||||
patch("0002-Fix-numactl-rocm-smi-path-issue.patch", when="@4.5.0:5.2.1")
|
||||
patch("0002-Fix-numactl-rocm-smi-path-issue.patch", when="@:5.2.1")
|
||||
patch("0003-Fix-numactl-rocm-smi-path-issue.patch", when="@5.2.3:5.6")
|
||||
patch("0004-Set-rocm-core-path-for-version-file.patch", when="@6.0:")
|
||||
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
"5.2.1",
|
||||
"5.2.3",
|
||||
"5.3.0",
|
||||
"5.3.3",
|
||||
"5.4.0",
|
||||
"5.4.3",
|
||||
"5.5.0",
|
||||
"5.5.1",
|
||||
"5.6.0",
|
||||
"5.6.1",
|
||||
"5.7.0",
|
||||
"5.7.1",
|
||||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("comgr@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("chrpath", when="@5.3.0:5", type="build")
|
||||
depends_on("numactl@2:")
|
||||
|
||||
for ver in [
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -195,12 +76,12 @@ class Rccl(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("numactl@2:", when="@" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in [
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -219,11 +100,10 @@ class Rccl(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-smi-lib@" + ver, when="@" + ver)
|
||||
depends_on("chrpath", when="@5.3.0:")
|
||||
depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
depends_on("googletest@1.11.0:", when="@5.3:")
|
||||
|
||||
|
@ -243,18 +123,16 @@ def setup_build_environment(self, env):
|
|||
env.set("ROCMCORE_PATH", self.spec["rocm-core"].prefix)
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
if "@3.7.0:" in self.spec:
|
||||
args.append(self.define("NUMACTL_DIR", self.spec["numactl"].prefix))
|
||||
|
||||
args = [
|
||||
self.define("NUMACTL_DIR", self.spec["numactl"].prefix),
|
||||
self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix),
|
||||
]
|
||||
if "auto" not in self.spec.variants["amdgpu_target"]:
|
||||
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
||||
|
||||
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
|
||||
args.append(self.define("__skip_rocmclang", "ON"))
|
||||
|
||||
if self.spec.satisfies("@4.5.0:"):
|
||||
args.append(self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix))
|
||||
if self.spec.satisfies("@5.3.0:"):
|
||||
args.append(self.define("BUILD_TESTS", "ON"))
|
||||
return args
|
||||
|
|
|
@ -46,69 +46,8 @@ def url_for_version(self, version):
|
|||
version("5.2.0", sha256="2f35f74485e783f56ea724a7c69ce825f181fcdbe89de453d97ce6a3d3176ae0")
|
||||
version("5.1.3", sha256="ac3e594d7b245c787d6d9b63f551ca898d4d9403fbec0e4502f9970575e031b8")
|
||||
version("5.1.0", sha256="3cf58cb07ef241b3b73b23af83b6477194884feba642584a491e67deeceff038")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="9e21fe7e9dd02b69425dab6be22a85469fee072bcebd2d2957633dfad8b45574",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="68d45a319dc4222d94e1fb1ce10df5f3464de0b745d0d2e9aebbf273493adcc5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="1b467e2a473374488292ca1680562ec4e798f43847ea6464453f8f8297f12d8d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="e9bc53d068e9a4fdccff587e34c7fe0880f003a18652cd48c29faf031dd2c98f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="aae028aae61eb0f4dd30708c4bbb8c5c57a426f10dae9b967b81500fb106d981",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="d3dda2022ec1f8c7de4de64696009125a903fcb2f82c38b3ac07e4ab35bf9190",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="ea2c7c07d55f607968f58d7e30326cae5db5b48c1ba354caa5727394d5bad258",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="dc81ee9727c8913c05dcf20a00669ce611339ef6d6db8af34e57f42bcfa804ac",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="e9ebfc46dfa983400909ed8a9da4fa37869ab118a8426c2e4f793e21174ca07f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="fdc51f9f1f756406d1e2ffaeee0e247d1b04fc4078f08e581bbaa7da79697ac1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="bc6339e7f41850a4a049d085a880cfafd3fd8e1610fb94c572d79753d01aa298",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="d0d0a0e68a848b7a8fa2d88c1d0352ce68e1e142debf32c31d941904f03c4b2f",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.15:3.19.7", type="build", when="@:4.3.1")
|
||||
depends_on("cmake@3.15:", type="build", when="@4.5.0:")
|
||||
depends_on("cmake@3.15:", type="build")
|
||||
depends_on("grpc@1.28.1+shared", type="build", when="@:5.3")
|
||||
depends_on("grpc@1.44.0+shared", when="@5.4.0:5.4")
|
||||
depends_on("grpc@1.55.0+shared", when="@5.5.0:")
|
||||
|
@ -116,18 +55,6 @@ def url_for_version(self, version):
|
|||
depends_on("libcap")
|
||||
|
||||
for ver in [
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -146,11 +73,9 @@ def url_for_version(self, version):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-smi-lib@" + ver, type=("build", "link"), when="@" + ver)
|
||||
depends_on(f"rocm-smi-lib@{ver}", type=("build", "link"), when=f"@{ver}")
|
||||
|
||||
for ver in [
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -169,10 +94,10 @@ def url_for_version(self, version):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
def patch(self):
|
||||
filter_file(r"\${ROCM_DIR}/rocm_smi", "${ROCM_SMI_DIR}", "CMakeLists.txt")
|
||||
|
@ -184,13 +109,13 @@ def patch(self):
|
|||
)
|
||||
if self.spec.satisfies("@5.4.0:5.4"):
|
||||
filter_file(
|
||||
"${ROCM_DIR}/${CMAKE_INSTALL_INCLUDEDIR}",
|
||||
r"${ROCM_DIR}/${CMAKE_INSTALL_INCLUDEDIR}",
|
||||
"{0}/include".format(self.spec["rocm-smi-lib"].prefix),
|
||||
"CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
filter_file(
|
||||
"${ROCM_DIR}/${CMAKE_INSTALL_LIBDIR}",
|
||||
r"${ROCM_DIR}/${CMAKE_INSTALL_LIBDIR}",
|
||||
"{0}/lib".format(self.spec["rocm-smi-lib"].prefix),
|
||||
"CMakeLists.txt",
|
||||
string=True,
|
||||
|
@ -200,22 +125,14 @@ def patch(self):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
rpath = self.rpath
|
||||
rpath.append(self.prefix.opt.rocm.rdc.lib)
|
||||
rpath = ";".join(rpath)
|
||||
args = [
|
||||
"-DCMAKE_INSTALL_RPATH=" + rpath,
|
||||
"-DGRPC_ROOT=" + self.spec["grpc"].prefix,
|
||||
"-DCMAKE_MODULE_PATH={0}/cmake_modules".format(self.stage.source_path),
|
||||
"-DROCM_SMI_DIR=" + self.spec["rocm-smi-lib"].prefix,
|
||||
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=1",
|
||||
return [
|
||||
self.define("GRPC_ROOT", self.spec["grpc"].prefix),
|
||||
self.define("CMAKE_MODULE_PATH", f"{self.stage.source_path}/cmake_modules"),
|
||||
self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix),
|
||||
]
|
||||
return args
|
||||
|
|
|
@ -45,76 +45,6 @@ class Rocalution(CMakePackage):
|
|||
version("5.2.0", sha256="a5aac471bbec87d019ad7c6db779c73327ad40ecdea09dc5ab2106e62cd6b7eb")
|
||||
version("5.1.3", sha256="7febe8179f120cbe58ea255bc233ad5d1b4c106f3934eb8e670135a8b7bd09c7")
|
||||
version("5.1.0", sha256="d9122189103ebafe7ec5aeb50e60f3e02af5c2747021f9071aab91e7f875c29e")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="b01adaf858b9c3683523b087a55fafb655864f5db8e2a1acdbf588f53d6972e2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="df9e7eacb8cc1bd5c7c4071b20356a885ee8ae13e6ab5afdabf88a272ab32c7e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="8be38922320cd9d4fc465a30f0322843849f62c0c7dad2bdbe52290a1b69d2a0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="191629fef002fd1a0793a6b4fe5a6b8c43ac49d3cd173ba64a91359f54659e5b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="d3a7b9290f99bdc7382d1d5259c3f5e0e66a43aef4d05b7c2cd78b0e4a5c59bc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="f064b96f9f04cf22b89f95f72147fcfef28e2c56ecd764008c060f869c74c144",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="0424adf522ded41de5b77666e04464a25c73c92e34025762f30837f90a797445",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="3f61be18a02dff0c152a0ad7eb4779c43dd744b0ba172aa6a4267fc596d582e4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="80a224a5c19dea290e6edc0e170c3dff2e726c2b3105d599ec6858cc66f076a9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="c24cb9d1a8a1a3118040b8b16dec7c06268bcf157424d3378256cc9eb93f1b58",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="1ce36801fe1d44f743b46b43345c0cd90d76b73911b2ec97be763f93a35396fb",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="39e64a29e75c4276163a93596436064c6338770ca72ce7f43711ed8285ed2de5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="4d6b20aaaac3bafb7ec084d684417bf578349203b0f9f54168f669e3ec5699f8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="be2f78c10c100d7fd9df5dd2403a44700219c2cbabaacf2ea50a6e2241df7bfe",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
||||
|
@ -126,33 +56,8 @@ class Rocalution(CMakePackage):
|
|||
)
|
||||
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
for ver in ["3.5.0", "3.7.0", "3.8.0"]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocprim@" + ver, when="@" + ver)
|
||||
for tgt in itertools.chain(["auto"], amdgpu_targets):
|
||||
rocblas_tgt = tgt if tgt != "gfx900:xnack-" else "gfx900"
|
||||
depends_on(
|
||||
"rocblas@{0} amdgpu_target={1}".format(ver, rocblas_tgt),
|
||||
when="@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
)
|
||||
depends_on(
|
||||
"rocsparse@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
when="@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
|
||||
for ver in [
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -171,23 +76,16 @@ class Rocalution(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocprim@" + ver, when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocprim@{ver}", when=f"@{ver}")
|
||||
for tgt in itertools.chain(["auto"], amdgpu_targets):
|
||||
rocblas_tgt = tgt if tgt != "gfx900:xnack-" else "gfx900"
|
||||
depends_on(
|
||||
"rocblas@{0} amdgpu_target={1}".format(ver, rocblas_tgt),
|
||||
when="@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
f"rocblas@{ver} amdgpu_target={rocblas_tgt}", when=f"@{ver} amdgpu_target={tgt}"
|
||||
)
|
||||
depends_on(
|
||||
"rocsparse@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
when="@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
)
|
||||
depends_on(
|
||||
"rocrand@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
when="@{0} amdgpu_target={1}".format(ver, tgt),
|
||||
)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on(f"rocsparse@{ver} amdgpu_target={tgt}", when=f"@{ver} amdgpu_target={tgt}")
|
||||
depends_on(f"rocrand@{ver} amdgpu_target={tgt}", when=f"@{ver} amdgpu_target={tgt}")
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
# This fix is added to address the compilation failure and it is
|
||||
|
@ -200,25 +98,22 @@ def setup_build_environment(self, env):
|
|||
env.set("CXX", self.spec["hip"].hipcc)
|
||||
|
||||
def patch(self):
|
||||
if "@3.9.0:" in self.spec:
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
|
||||
with working_dir("src/base/hip"):
|
||||
match = "^#include <rocrand/rocrand.hpp>"
|
||||
substitute = "#include <rocrand.hpp>"
|
||||
files = ["hip_rand_normal.hpp", "hip_rand_uniform.hpp"]
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
with working_dir("src/base/hip"):
|
||||
filter_file(
|
||||
"^#include <rocrand/rocrand.hpp>",
|
||||
"#include <rocrand.hpp>",
|
||||
"hip_rand_normal.hpp",
|
||||
"hip_rand_uniform.hpp",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
|
@ -227,9 +122,9 @@ def cmake_args(self):
|
|||
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
|
||||
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
|
||||
]
|
||||
if self.spec.satisfies("@3.7.0:5.1.3"):
|
||||
if self.spec.satisfies("@:5.1"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
|
||||
elif self.spec.satisfies("@5.2.0:"):
|
||||
elif self.spec.satisfies("@5.2:"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip))
|
||||
if "auto" not in self.spec.variants["amdgpu_target"]:
|
||||
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
||||
|
@ -237,10 +132,10 @@ def cmake_args(self):
|
|||
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
|
||||
args.append(self.define("__skip_rocmclang", "ON"))
|
||||
|
||||
if self.spec.satisfies("@5.2.0:"):
|
||||
if self.spec.satisfies("@5.2:"):
|
||||
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
|
||||
|
||||
if self.spec.satisfies("@5.3.0:"):
|
||||
if self.spec.satisfies("@5.3:"):
|
||||
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
|
||||
|
||||
return args
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
From f4e7ceba4593540d6d6bf35a958d187cc84c5172 Mon Sep 17 00:00:00 2001
|
||||
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||
Date: Mon, 10 Aug 2020 23:39:22 +0200
|
||||
Subject: [PATCH] Fix compilation error with StringRef to basic string
|
||||
|
||||
---
|
||||
Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp b/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
|
||||
index 16e64ff9..0d00f470 100644
|
||||
--- a/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
|
||||
+++ b/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
|
||||
@@ -261,7 +261,7 @@ namespace llvm
|
||||
|
||||
static void inputOne(IO& io, StringRef key, Hide<T>& value)
|
||||
{
|
||||
- Impl::inputOne(io, key, *value);
|
||||
+ Impl::inputOne(io, key.str(), *value);
|
||||
}
|
||||
|
||||
static void output(IO& io, Hide<T>& value)
|
||||
--
|
||||
2.25.1
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
diff -r -u a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
|
||||
--- a/clients/benchmarks/CMakeLists.txt 2021-11-12 12:22:24.359556397 -0700
|
||||
+++ b/clients/benchmarks/CMakeLists.txt 2021-11-12 14:21:31.246604351 -0700
|
||||
@@ -52,6 +52,8 @@
|
||||
target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas )
|
||||
if(LINK_BLIS)
|
||||
target_link_libraries( rocblas-bench PRIVATE ${BLIS_LIBRARY} )
|
||||
+else()
|
||||
+ target_link_libraries( rocblas-bench PRIVATE blas )
|
||||
endif()
|
||||
|
||||
if( CUDA_FOUND )
|
||||
diff -r -u a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
|
||||
--- a/clients/gtest/CMakeLists.txt 2021-11-12 12:22:24.359556397 -0700
|
||||
+++ b/clients/gtest/CMakeLists.txt 2021-11-12 14:20:59.057676192 -0700
|
||||
@@ -132,6 +132,8 @@
|
||||
target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${GTEST_LIBRARIES} )
|
||||
if(LINK_BLIS)
|
||||
target_link_libraries( rocblas-test PRIVATE ${BLIS_LIBRARY} )
|
||||
+else()
|
||||
+ target_link_libraries( rocblas-test PRIVATE blas )
|
||||
endif()
|
||||
|
||||
|
|
@ -41,76 +41,6 @@ class Rocblas(CMakePackage):
|
|||
version("5.2.0", sha256="b178b7db5f0af55b21b5f744b8825f5e002daec69b4688e50df2bca2fac155bd")
|
||||
version("5.1.3", sha256="915374431db8f0cecdc2bf318a0ad33c3a8eceedc461d7a06b92ccb02b07313c")
|
||||
version("5.1.0", sha256="efa0c424b5ada697314aa8a78c19c93ade15f1612c4bfc8c53d71d1c9719aaa3")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="358a0902fc279bfc80205659a90e96269cb7d83a80386b121e4e3dfe221fec23",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="4b01fba937ada774f09c7ccb5e9fdc66e1a5d46c130be833e3706e6b5841b1da",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="15d725e38f91d1ff7772c4204b97c1515af58fa7b8ec2a2014b99b6d337909c4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="22d15a1389a10f1324f5e0ceac1a6ec0758a2801a18419a55e37e2bc63793eaf",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="ad3c09573cb2bcfdb12bfb5a05e85f9c95073993fd610981df24dda792727b4b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="b15a66c861b3394cb83c56b64530b2c7e57b2b4c50f55d0e66bb3d1483b50ec4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="547f6d5d38a41786839f01c5bfa46ffe9937b389193a8891f251e276a1a47fb0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="8be20c722bab169bc4badd79a9eab9a1aa338e0e5ff58ad85ba6bf09e8ac60f4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="78e37a7597b581d90a29e4b956fa65d0f8d1c8fb51667906b5fe2a223338d401",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="9bfd0cf99662192b1ac105ab387531cfa9338ae615db80ed690c6a14d987e0e8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="3ecd2d9fd2be0e1697a191d143a2d447b53a91ae01afb50231d591136ad5e2fe",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="568a9da0360349b1b134d74cc67cbb69b43c06eeca7c33b50072cd26cd3d8900",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="9425db5f8e8b6f7fb172d09e2a360025b63a4e54414607709efc5acb28819642",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="8560fabef7f13e8d67da997de2295399f6ec595edfd77e452978c140d5f936f0",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
||||
|
@ -122,54 +52,23 @@ class Rocblas(CMakePackage):
|
|||
)
|
||||
variant("tensile", default=True, description="Use Tensile as a backend")
|
||||
|
||||
# gfx906, gfx908,gfx803,gfx900 are valid for @:4.0.0
|
||||
# gfx803,gfx900,gfx:xnack-,gfx908:xnack- are valid gpus for @4.1.0:4.2.0
|
||||
# gfx803 till gfx1030 are valid gpus for @4.3.0:
|
||||
conflicts("amdgpu_target=gfx906:xnack-", when="@:4.0.0")
|
||||
conflicts("amdgpu_target=gfx908:xnack-", when="@:4.0.0")
|
||||
conflicts("amdgpu_target=gfx90a:xnack+", when="@:4.2.1")
|
||||
conflicts("amdgpu_target=gfx90a:xnack-", when="@:4.2.1")
|
||||
conflicts("amdgpu_target=gfx1010", when="@:4.2.1")
|
||||
conflicts("amdgpu_target=gfx1011", when="@:4.2.1")
|
||||
conflicts("amdgpu_target=gfx1012", when="@:4.2.1")
|
||||
conflicts("amdgpu_target=gfx1030", when="@:4.2.1")
|
||||
# https://reviews.llvm.org/D124866
|
||||
# https://github.com/ROCm/HIP/issues/2678
|
||||
# https://github.com/ROCm/hipamd/blob/rocm-5.2.x/include/hip/amd_detail/host_defines.h#L50
|
||||
conflicts("%gcc@12", when="@5.2")
|
||||
|
||||
depends_on("cmake@3.16.8:", type="build", when="@4.2.0:")
|
||||
depends_on("cmake@3.8:", type="build", when="@3.9.0:")
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
depends_on("cmake@3.16.8:", type="build")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
depends_on("amdblis", type="test")
|
||||
|
||||
for ver in ["5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-openmp-extras@" + ver, type="test", when="@" + ver)
|
||||
depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"@{ver}")
|
||||
|
||||
depends_on("hip@4.1.0:", when="@4.1.0:")
|
||||
depends_on("llvm-amdgpu@4.1.0:", type="build", when="@4.1.0:")
|
||||
depends_on("rocm-cmake@master", type="build", when="@master:")
|
||||
depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:")
|
||||
depends_on("rocm-cmake@4.3.0:", type="build", when="@4.3.0:")
|
||||
depends_on("rocm-cmake@3.5.0:", type="build")
|
||||
depends_on("rocm-cmake", type="build")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -188,15 +87,14 @@ class Rocblas(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, type="build", when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", type="build", when=f"@{ver}")
|
||||
|
||||
depends_on("python@3.6:", type="build")
|
||||
|
||||
with when("+tensile"):
|
||||
# default library format since 3.7.0
|
||||
depends_on("msgpack-c@3:", when="@3.7:")
|
||||
depends_on("msgpack-c@3:")
|
||||
|
||||
depends_on("py-virtualenv", type="build")
|
||||
depends_on("perl-file-which", type="build")
|
||||
|
@ -208,20 +106,6 @@ class Rocblas(CMakePackage):
|
|||
depends_on("procps", type="build", when="@5.6:")
|
||||
|
||||
for t_version, t_commit in [
|
||||
("@3.5.0", "f842a1a4427624eff6cbddb2405c36dec9a210cd"),
|
||||
("@3.7.0", "af71ea890a893e647bf2cf4571a90297d65689ca"),
|
||||
("@3.8.0", "9123205f9b5f95c96ff955695e942d2c3b321cbf"),
|
||||
("@3.9.0", "b68edc65aaeed08c71b2b8622f69f83498b57d7a"),
|
||||
("@3.10.0", "ab44bf46b609b5a40053f310bef2ab7511f726ae"),
|
||||
("@4.0.0", "ab44bf46b609b5a40053f310bef2ab7511f726ae"),
|
||||
("@4.1.0", "d175277084d3253401583aa030aba121e8875bfd"),
|
||||
("@4.2.0", "3438af228dc812768b20a068b0285122f327fa5b"),
|
||||
("@4.3.0", "9cbabb07f81e932b9c98bf5ae48fbd7fcef615cf"),
|
||||
("@4.3.1", "9cbabb07f81e932b9c98bf5ae48fbd7fcef615cf"),
|
||||
("@4.5.0", "0f6a6d1557868d6d563cb1edf167c32c2e34fda0"),
|
||||
("@4.5.2", "0f6a6d1557868d6d563cb1edf167c32c2e34fda0"),
|
||||
("@5.0.0", "75b9aefe5981d85d1df32ddcebf32dab52bfdabd"),
|
||||
("@5.0.2", "75b9aefe5981d85d1df32ddcebf32dab52bfdabd"),
|
||||
("@5.1.0", "ea38f8661281a37cd81c96cc07868e3f07d2c4da"),
|
||||
("@5.1.3", "ea38f8661281a37cd81c96cc07868e3f07d2c4da"),
|
||||
("@5.2.0", "9ca08f38c4c3bfe6dfa02233637e7e3758c7b6db"),
|
||||
|
@ -244,7 +128,7 @@ class Rocblas(CMakePackage):
|
|||
name="Tensile",
|
||||
git="https://github.com/ROCm/Tensile.git",
|
||||
commit=t_commit,
|
||||
when="{} +tensile".format(t_version),
|
||||
when=f"{t_version} +tensile",
|
||||
)
|
||||
|
||||
for ver in ["master", "develop"]:
|
||||
|
@ -252,14 +136,10 @@ class Rocblas(CMakePackage):
|
|||
name="Tensile",
|
||||
git="https://github.com/ROCm/Tensile.git",
|
||||
branch=ver,
|
||||
when="@{} +tensile".format(ver),
|
||||
when=f"@{ver} +tensile",
|
||||
)
|
||||
|
||||
# Status: https://github.com/ROCm/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087
|
||||
# Not yet landed in 3.7.0, nor 3.8.0.
|
||||
patch("0001-Fix-compilation-error-with-StringRef-to-basic-string.patch", when="@:3.8")
|
||||
patch("0002-Fix-rocblas-clients-blas.patch", when="@4.2.0:4.3.1")
|
||||
patch("0003-Fix-rocblas-gentest.patch", when="@4.2.0:5.1")
|
||||
patch("0003-Fix-rocblas-gentest.patch", when="@:5.1")
|
||||
# Finding Python package and set command python as python3
|
||||
patch("0004-Find-python.patch", when="@5.2.0:5.4")
|
||||
patch("0006-Guard-use-of-OpenMP-to-make-it-optional-5.4.patch", when="@5.4")
|
||||
|
@ -300,7 +180,6 @@ def cmake_args(self):
|
|||
self.define("BLAS_LIBRARY", self.spec["amdblis"].prefix + "/lib/libblis.a")
|
||||
)
|
||||
|
||||
arch_define_name = "AMDGPU_TARGETS"
|
||||
if "+tensile" in self.spec:
|
||||
tensile_path = join_path(self.stage.source_path, "Tensile")
|
||||
args += [
|
||||
|
@ -308,11 +187,8 @@ def cmake_args(self):
|
|||
self.define("Tensile_COMPILER", "hipcc"),
|
||||
self.define("Tensile_LOGIC", "asm_full"),
|
||||
self.define("BUILD_WITH_TENSILE_HOST", "@3.7.0:" in self.spec),
|
||||
self.define("Tensile_LIBRARY_FORMAT", "msgpack"),
|
||||
]
|
||||
if self.spec.satisfies("@3.7.0:"):
|
||||
args.append(self.define("Tensile_LIBRARY_FORMAT", "msgpack"))
|
||||
if self.spec.satisfies("@:4.2.0"):
|
||||
arch_define_name = "Tensile_ARCHITECTURE"
|
||||
# Restrict the number of jobs Tensile can spawn.
|
||||
# If we don't specify otherwise, Tensile creates a job per available core,
|
||||
# and that consumes a lot of system memory.
|
||||
|
@ -321,7 +197,7 @@ def cmake_args(self):
|
|||
|
||||
# See https://github.com/ROCm/rocBLAS/commit/c1895ba4bb3f4f5947f3818ebd155cf71a27b634
|
||||
if "auto" not in self.spec.variants["amdgpu_target"]:
|
||||
args.append(self.define_from_variant(arch_define_name, "amdgpu_target"))
|
||||
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
||||
|
||||
# See https://github.com/ROCm/rocBLAS/issues/1196
|
||||
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
|
||||
index 0fed2d2..c426b94 100644
|
||||
--- a/library/src/CMakeLists.txt
|
||||
+++ b/library/src/CMakeLists.txt
|
||||
@@ -138,27 +138,42 @@ set( rocfft_source
|
||||
# for cache serialization. We also want to use a static SQLite,
|
||||
# and distro static libraries aren't typically built
|
||||
# position-independent.
|
||||
-include( FetchContent )
|
||||
|
||||
-# embed SQLite
|
||||
-FetchContent_Declare(sqlite_local
|
||||
- URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip
|
||||
- URL_HASH SHA256=999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729
|
||||
-)
|
||||
-FetchContent_MakeAvailable(sqlite_local)
|
||||
-add_library( sqlite3 STATIC ${sqlite_local_SOURCE_DIR}/sqlite3.c )
|
||||
-set_target_properties( sqlite3 PROPERTIES
|
||||
- C_VISIBILITY_PRESET "hidden"
|
||||
- VISIBILITY_INLINES_HIDDEN ON
|
||||
- POSITION_INDEPENDENT_CODE ON
|
||||
+option( SQLITE_USE_SYSTEM_PACKAGE "Use SQLite3 from find_package" OFF )
|
||||
+if( SQLITE_USE_SYSTEM_PACKAGE )
|
||||
+ find_package(SQLite3 3.36 REQUIRED)
|
||||
+ set(ROCFFT_SQLITE_LIB SQLite::SQLite3)
|
||||
+else()
|
||||
+ include( FetchContent )
|
||||
+ if(DEFINED ENV{SQLITE_SRC_URL})
|
||||
+ set(SQLITE_SRC_URL_INIT $ENV{SQLITE_SRC_URL})
|
||||
+ else()
|
||||
+ set(SQLITE_SRC_URL_INIT https://sqlite.org/2021/sqlite-amalgamation-3360000.zip)
|
||||
+ endif()
|
||||
+ set(SQLITE_SRC_URL ${SQLITE_SRC_URL_INIT} CACHE STRING "Location of SQLite source code")
|
||||
+ set(SQLITE_SRC_SHA256 999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729 CACHE STRING "SHA256 hash of SQLite source code")
|
||||
+
|
||||
+ # embed SQLite
|
||||
+ FetchContent_Declare(sqlite_local
|
||||
+ URL ${SQLITE_SRC_URL}
|
||||
+ URL_HASH SHA256=${SQLITE_SRC_SHA256}
|
||||
)
|
||||
-
|
||||
-# we don't need extensions, and omitting them from SQLite removes the
|
||||
-# need for dlopen/dlclose from within rocFFT
|
||||
-target_compile_options(
|
||||
- sqlite3
|
||||
- PRIVATE -DSQLITE_OMIT_LOAD_EXTENSION
|
||||
-)
|
||||
+ FetchContent_MakeAvailable(sqlite_local)
|
||||
+ add_library( sqlite3 OBJECT ${sqlite_local_SOURCE_DIR}/sqlite3.c )
|
||||
+ set_target_properties( sqlite3 PROPERTIES
|
||||
+ C_VISIBILITY_PRESET "hidden"
|
||||
+ VISIBILITY_INLINES_HIDDEN ON
|
||||
+ POSITION_INDEPENDENT_CODE ON
|
||||
+ )
|
||||
+
|
||||
+ # we don't need extensions, and omitting them from SQLite removes the
|
||||
+ # need for dlopen/dlclose from within rocFFT
|
||||
+ target_compile_options(
|
||||
+ sqlite3
|
||||
+ PRIVATE -DSQLITE_OMIT_LOAD_EXTENSION
|
||||
+ )
|
||||
+ set(ROCFFT_SQLITE_LIB sqlite3)
|
||||
+endif()
|
||||
|
||||
set_property(
|
||||
SOURCE rtc.cpp
|
||||
@@ -169,8 +184,8 @@ prepend_path( ".." rocfft_headers_public relative_rocfft_headers_public )
|
||||
|
||||
add_library( rocfft ${rocfft_source} ${relative_rocfft_headers_public} )
|
||||
add_library( roc::rocfft ALIAS rocfft )
|
||||
+target_link_libraries( rocfft PRIVATE ${ROCFFT_SQLITE_LIB} )
|
||||
|
||||
-target_link_libraries( rocfft PRIVATE stockham_gen sqlite3 )
|
||||
if( NOT WIN32 )
|
||||
target_link_libraries( rocfft PRIVATE -lstdc++fs )
|
||||
endif()
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt
|
||||
index 6f2bfb8..2354f7b 100644
|
||||
--- a/clients/tests/CMakeLists.txt
|
||||
+++ b/clients/tests/CMakeLists.txt
|
||||
@@ -58,7 +58,7 @@ find_package( FFTW 3.0 REQUIRED MODULE COMPONENTS FLOAT DOUBLE )
|
||||
|
||||
set( rocfft-test_include_dirs
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
- $<BUILD_INTERFACE:${FFTW_INCLUDES}>
|
||||
+ $<BUILD_INTERFACE:${FFTW_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/misc/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../library/src/include>
|
||||
)
|
|
@ -38,76 +38,6 @@ class Rocfft(CMakePackage):
|
|||
version("5.2.0", sha256="ebba280b7879fb4bc529a68072b98d4e815201f90d24144d672094bc241743d4")
|
||||
version("5.1.3", sha256="b4fcd03c1b07d465bb307ec33cc7fb50036dff688e497c5e52b2dec37f4cb618")
|
||||
version("5.1.0", sha256="dc11c9061753ae43a9d5db9c4674aa113a8adaf50818b2701cbb940894147f68")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="30d4bd5fa85185ddafc69fa6d284edd8033c9d77d1e351fa328267242995eb0a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="c16374dac2f85fbaf145511653e93f6db3151425ce39b282187745c716b67405",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="2724118ca00b9e97ac9578fe0b7e64a82d86c4fb0246d0da88d8ddd9c608b1e1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="045c1cf1737db6e7ee332c274dacdb565f99c976ed4cc5626a116878dc80a48c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="fcdc4d12b93d967b6f992b4045da98433eabf2ee0ba84fc6b6f81e380584fbc9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="cb5b8f62330bc61b17a3a2fd1500068ee05d48cb51797901dd259dbc84610478",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="db29c9067f0cfa98bddd3574f6aa7200cfc790cc6da352d19e4696c3f3982163",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="df23fcb05aae72557461ae3687be7e3b8b78be4132daf1aa9dc07339f4eba0cc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="d1d10d270f822e0bab64307313ef163ba449b058bf3352962bbb26d4f4db89d0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="9f57226aac7d9a0515e14a5a5b08a85e727de72b3f9c2177daf56749ac2c76ae",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="9c9c0b7f09bab17250f5101d1605e7a61218eae828a3eb8fe048d607181294ce",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="ed23009796e2ee7c43dcc24527f2d6b1d7a73dceac06c30384460098d2fe1556",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="94462e4bd19c2c749fcf6903adbee66d4d3bd345c0246861ff8f40b9d08a6ead",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="629f02cfecb7de5ad2517b6a8aac6ed4de60d3a9c620413c4d9db46081ac2c88",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
||||
|
@ -124,10 +54,9 @@ class Rocfft(CMakePackage):
|
|||
sticky=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.16:", type="build", when="@4.5.0:")
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
depends_on("python@3.6:", type="build", when="@5.0.0:")
|
||||
depends_on("sqlite@3.36:", when="@5.0.0:")
|
||||
depends_on("cmake@3.16:", type="build")
|
||||
depends_on("python@3.6:", type="build")
|
||||
depends_on("sqlite@3.36:")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
depends_on("fftw@3.3.8:", type="test")
|
||||
|
@ -140,20 +69,6 @@ def check(self):
|
|||
self.run_test(exe, options="--gtest_filter=mix*:adhoc*")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -172,13 +87,11 @@ def check(self):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
|
||||
patch("0001-Improve-compilation-by-using-sqlite-recipe-for-rocfft.patch", when="@5.0.0:5.0.2")
|
||||
# Patch to add spack build test support. No longer required from 5.2
|
||||
patch("0002-Fix-clients-fftw3-include-dirs-rocm-4.2.patch", when="@4.2.0:4.3.1")
|
||||
patch("0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch", when="@4.5.0:5.1")
|
||||
patch("0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch", when="@:5.1")
|
||||
# Patch to add install prefix header location for sqlite for 5.4
|
||||
patch("0004-fix-missing-sqlite-include-paths.patch", when="@5.4.0:5.5")
|
||||
|
||||
|
@ -197,46 +110,30 @@ def setup_build_environment(self, env):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
args = [self.define("BUILD_CLIENTS_TESTS", self.run_tests)]
|
||||
args = [
|
||||
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
|
||||
self.define("SQLITE_USE_SYSTEM_PACKAGE", True),
|
||||
]
|
||||
|
||||
tgt = self.spec.variants["amdgpu_target"]
|
||||
|
||||
if "auto" not in tgt:
|
||||
if "@:3.8.0" in self.spec:
|
||||
args.append(
|
||||
self.define(
|
||||
"CMAKE_CXX_FLAGS", "--amdgpu-target={0}".format(",".join(tgt.value))
|
||||
)
|
||||
)
|
||||
else:
|
||||
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
||||
|
||||
# From version 3.9 and above we have AMDGPU_TARGETS_SRAM_ECC
|
||||
tgt_sram = self.spec.variants["amdgpu_target_sram_ecc"]
|
||||
|
||||
if "auto" not in tgt_sram and self.spec.satisfies("@3.9.0:4.0.0"):
|
||||
args.append(
|
||||
self.define_from_variant("AMDGPU_TARGETS_SRAM_ECC", "amdgpu_target_sram_ecc")
|
||||
)
|
||||
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
||||
|
||||
# See https://github.com/ROCm/rocFFT/issues/322
|
||||
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
|
||||
args.append(self.define("__skip_rocmclang", "ON"))
|
||||
|
||||
if self.spec.satisfies("@5.0.0:"):
|
||||
args.append(self.define("SQLITE_USE_SYSTEM_PACKAGE", "ON"))
|
||||
|
||||
if self.spec.satisfies("@5.2.0:"):
|
||||
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
|
||||
|
||||
if self.spec.satisfies("@5.3.0:"):
|
||||
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
|
||||
args.append(self.define("CMAKE_INSTALL_LIBDIR", "lib"))
|
||||
|
||||
return args
|
||||
|
|
|
@ -36,94 +36,10 @@ class RocmBandwidthTest(CMakePackage):
|
|||
version("5.2.0", sha256="046f2a6984c62899f57a557490136fbe7ab28e2fd334750abac71b03609226ef")
|
||||
version("5.1.3", sha256="6a6e7fb998c886951db75dcf34dca523d9caaff8d0ccf2b7431504a1808b1ff3")
|
||||
version("5.1.0", sha256="18fe51f0ba61760fc89ffc81f737fd4fa20fb4b00df3f35145be77c3e0a6162b")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="c93f7dbb37233aa32d81057fa8b3fa88d7c7be9b7916430b5ffc701600a5ff45",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="b33c6a12ad8de1d7ea9b8b380b8fa5db6b601ed426c3d3940134863f7d10740f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="559ca7ef582d81047c5dd5a908f3989cb2694e89577f7f556214e324ba65e75e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="4d20a6017ca6975df98f3ca61ba95fa0c7c62fbf63cd6abae3396c30a423933f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="a4804c28586457c231594b4e7689872eaf91972119d892325468f3fe8fdbe5ef",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="c6eb406cd2836af61dd5987f6b761340a1be20f66a9325f480423d10b9d3ec1b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="d268365e3bb8031c1201c05e705074d1fd794d236843f80064855cf31e4412f5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="4e34b60a7e4090d6475f0cdd86594b1b9a7b85d4e343999b9e148e196f0c2f4c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="bde2aa743979eac195dd13ec8d0fcb7da183fff489da32c28b872eed7f6681b3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="ad1dedad9023ccb050082c866fa5131665d9c3b50de0b78e4618730c29a07773",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="f366299b48a29b419febb2ba398d1abe4cd01425d33254777e426966b722d3b1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="7de71a2ba17bbeea9107f2e9e65729f507234d6cbbb44f251240d64683027497",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="9aa1d4b7b01ee4d443effc76ed5f6f43a051fd815692b59dfccf0ecbfeaeed03",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="fbb63fb8713617fd167d9c1501acbd92a6b189ee8e1a8aed668fa6666baae389",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -143,10 +59,10 @@ class RocmBandwidthTest(CMakePackage):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
build_targets = ["package"]
|
||||
|
|
|
@ -36,94 +36,10 @@ class RocmClangOcl(CMakePackage):
|
|||
version("5.2.0", sha256="a2059f6aeccc119abbd444cb37128e00e4854e22a88a47f120f8f8b947d862c5")
|
||||
version("5.1.3", sha256="e19ee15f26fc03309398ac73cc738508c0e1617deccfd667d369a3948b5d3552")
|
||||
version("5.1.0", sha256="38d9e2e98cff1a262fdd45c3239fd76a9f6ad5eff38a31aa19c3bb0faea53375")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="5e8f39200227388817024ee7ce46a996e43e433ed308f8d5e8e4c03629d8a5e7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="0dff230754b790a417eb3d6be6f50c3727f944e0157686100354eba1e47d30f3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="8cc7b8658e81ef378c16bbb00fc6b29140c850da70adc4e520ecec9b4517beb8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="b9ab42629c8697f8ffdae99ffd25f939161fa8a7a1c49a9ce19d8b207bedbbae",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="12461d4fd4f3f40710d2c041cfee37da83ccda9d2761d7708335349e7ec5ad87",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="bc5650f2f105b10a1e22d8e5cc9464b0f960252a08e5e1fdee222af1fc5c022c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="702796f4e31f6119173d915db9bee13c060a75d9eb5b1f8e3d20779d6702dfdc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="c6e65da5541df9ee940caeeffe1b87c92547edc1770538fd2010c9c998a593b5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="c8f9091396ee0096f6d7c1cd13d80532c424e838bec1e4cebf903ebaf649e82e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="17fc8fb8c38b18f9f0cac339dda6cea3e9e66805f7a92ec2456072fc1e72fa85",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="3d63c7ac259ba8b0bfd5e4a94df1490c2b6cbac4d43dc7bbc210a536251268fe",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="a829aa2efb6e3bc00d8a08a96404f937f3c8adf3b4922b5ac35050d6e08b912d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="9c00c7e7dd3ac8326ae6772a43866b44ae049d5960ea6993d14a2370db74d326",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="38c95fbd0ac3d11d9bd224ad333b68b9620dde502b8a8a9f3d96ba642901e8bb",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -143,15 +59,13 @@ class RocmClangOcl(CMakePackage):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
|
||||
# support both builtin and standalone device libs
|
||||
depends_on(
|
||||
"rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver)
|
||||
)
|
||||
depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
test_src_dir = "test"
|
||||
|
||||
|
|
|
@ -39,82 +39,11 @@ class RocmCmake(CMakePackage):
|
|||
version("5.2.0", sha256="be8646c4f7babfe9a103c97d0e9f369322f8ac6cfa528edacdbdcf7f3ef44943")
|
||||
version("5.1.3", sha256="19b2da0d56300aab454655b57435ab3ed9e101ecb96561336ea8865bbd993c23")
|
||||
version("5.1.0", sha256="2eff47b7cf5bd56d465ff3c110eb936d31860df60182a82ba511ba11bbcf23fc")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="86a4ae0f84dcf5be95a252295eb732d6a7a271297eed37800a9d492c16474d0c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="45eb958fac33aafea86fb498127ebf8f567646ce9d7288d46afbd087500553a1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="85f2ef51327e4b09d81a221b4ad31c97923dabc1bc8ff127dd6c570742185751",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="c77b71454010adbeea5357773aa98dd0725f655f51a411815807cabf29258395",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="acf2a58e2cd486f473194bf01247c52dbf20bd5f6465810fb221470298f2557f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="bb752d8d2727b7ef2754838e389075dd4212cf5439d099392141f93d05391415",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="299e190ec3d38c2279d9aec762469628f0b2b1867adc082edc5708d1ac785c3b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="a4521d119fa07954e529d5e717ad1b338992c0694690dbce00fee26c01129c8c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="4577487acaa6e041a1316145867584f31caaf0d4aa2dd8fd7f82f81c269cada6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="751be4484efdcf0d5fa675480db6e2cddab897de4708c7c7b9fa7adb430b52d7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="e0a8db85bb55acb549f360eb9b04f55104aa93e4c3db33f9ba11d9adae2a07eb",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="9e4be93c76631224eb49b2fa30b0d14c1b3311a6519c8b393da96ac0649d9f30",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="51abfb06124c2e0677c4d6f7fe83c22fe855cb21386f0053ace09f8ab297058b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="5fc09e168879823160f5fdf4fd1ace2702d36545bf733e8005ed4ca18c3e910f",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("cmake@3.6:", type="build", when="@4.1.0:")
|
||||
depends_on("cmake@3.6:", type="build")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
test_src_dir = "test"
|
||||
|
||||
|
|
|
@ -43,95 +43,11 @@ class RocmDbgapi(CMakePackage):
|
|||
version("5.2.0", sha256="44f0528a7583bc59b6585166d2289970b20115c4c70e3bcc218aff19fc242b3f")
|
||||
version("5.1.3", sha256="880f80ebf741e3451676837f720551e02cffd0b9346ca4dfa6cf7f7043282f2b")
|
||||
version("5.1.0", sha256="406db4b20bda12f6f32cbef88b03110aa001bf7bef6676f36e909b53c8354e43")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="b7554dfe96bda6c2ee762ad6e3e5f91f0f52b5a525e3fb29d5e1fe6f003652b5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="cff72d7fe43ff791c4117fe87d57314cbebdbcb70002a0411b8a44761012a495",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="9fa574e8389ef69d116caf714af2f938777e0aeeaadd7fad451cf5d2e6699c6e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="583bbf18df593f376c4cc70f25b68c191bd38fde20a336c0f5c8e5d85fda2fcf",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="dddf2549ad6bb806f7e5d5a5336f5a00fe87a124f2a778be18ec4dc41f891912",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="4255d83d218bb0db8be9fef18e03a955ea1c6de1c635c31685ee5fc1540ddde6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="fcdee5aaf5ed40c0377ce007a2947da9e718eeee86ca3e13192ff9e96a1b7373",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="d04fd9b2005691313547c4134b027b56b0ec6089f67d3bccbdb8fb1c92cde9bd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="e87f31b3a22861397eb62d8363dd1e153596097ccfe68c6eefc1a83a2432ae18",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="89a8d352d59e4c0dc13160b1bf1f4bc3bfec5af544050030aa619b1ff88f1850",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="d1553f89d2b0419304ea82ed2b97abdc323c2fed183f0e119da1a72416a48136",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="760ff77c6578f3548f367a8bd3dda8680b7519f6b20216755105b87785d1e3f8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="bdeaf81ea8a0ac861a697e435c72cbe767c291638be43f0d09116ad605dfee4f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="eeba0592bc79b90e5b874bba18fd003eab347e8a3cc80343708f8d19e047e87b",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("hwdata", when="@5.5.0:")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -151,22 +67,20 @@ class RocmDbgapi(CMakePackage):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("hsa-rocr-dev@" + ver, type="build", when="@" + ver)
|
||||
depends_on("comgr@" + ver, type=("build", "link"), when="@" + ver)
|
||||
depends_on(f"hsa-rocr-dev@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", type=("build", "link"), when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def patch(self):
|
||||
filter_file(
|
||||
|
@ -178,5 +92,5 @@ def patch(self):
|
|||
def cmake_args(self):
|
||||
args = []
|
||||
if self.spec.satisfies("@5.3.0:"):
|
||||
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
|
||||
args.append(self.define("CMAKE_INSTALL_LIBDIR", "lib"))
|
||||
return args
|
||||
|
|
|
@ -36,104 +36,11 @@ class RocmDebugAgent(CMakePackage):
|
|||
version("5.2.0", sha256="f8e8d5ad691033d0c0f1850d69f35c98ba9722ab4adc66c4251f22257f56f0a2")
|
||||
version("5.1.3", sha256="ef26130829f3348d503669467ab1ea39fb67d943d88d64e7ac04b9617ec6067d")
|
||||
version("5.1.0", sha256="e0ceeef575d8645385bc6e4c9c3accaa192a93c42d83545cf5626c848f59806b")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="4ec3cdedc4ba774d05c3dc972186b3181b3aa823af08f3843238961d5ef90e57",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="fb8ebe136bfa815116453bdcb4afb9617ab488f54501434c72eed9706857be3f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="85c7f19485defd9a58716fffdd1a0e065ed7f779c3f124467fca18755bc634a6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="6486b1a8515da4711d3c85f8e41886f8fe6ba37ca2c63664f00c811f6296ac20",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="7bee6be6c29883f03f47a8944c0d50b7cf43a6b5eeed734602f521c3c40a18d0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="0cdee5792b808e03b839070da0d1b08dc4078a7d1fc295f0c99c6a5ae7d636a6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="ce02a5b752291882daa0a2befa23944e59087ce9fe65a91061476c3c399e4a0c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="b1ae874887e5ee037070f1dd46b145ad02ec9fd8a724c6b6ae194b534f01acdb",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="a9e64834d56a9221c242e71aa110c2cef0087aa8f86f50428dd618e5e623cc3c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="675b8d3cc4aecc4428a93553abf664bbe6a2cb153f1f480e6cadeeb4d24ef4b1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="3e56bf8b2b53d9102e8709b6259deea52257dc6210df16996b71a7d677952b1b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="55243331ac4b0d90e88882eb29fd06fad354e278f8a34ac7f0680b2c895ca2ac",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="d0f442a2b224a734b0080c906f0fc3066a698e5cde9ff97ffeb485b36d2caba1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="203ccb18d2ac508aae40bf364923f67375a08798b20057e574a0c5be8039f133",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = "https://github.com/ROCm/rocr_debug_agent/archive/"
|
||||
if version <= Version("3.7.0"):
|
||||
url += "roc-{0}.tar.gz".format(version)
|
||||
else:
|
||||
url += "rocm-{0}.tar.gz".format(version)
|
||||
|
||||
return url
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("elfutils@:0.168", type="link")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -152,23 +59,10 @@ def url_for_version(self, version):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in [
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -187,46 +81,30 @@ def url_for_version(self, version):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-dbgapi@" + ver, when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-dbgapi@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
# https://github.com/ROCm/rocr_debug_agent/pull/4
|
||||
patch("0001-Drop-overly-strict-Werror-flag.patch", when="@3.7.0:")
|
||||
patch("0002-add-hip-architecture.patch", when="@3.9.0:")
|
||||
patch("0001-Drop-overly-strict-Werror-flag.patch")
|
||||
patch("0002-add-hip-architecture.patch")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
@property
|
||||
def root_cmakelists_dir(self):
|
||||
if self.spec.satisfies("@3.5.0"):
|
||||
return "src"
|
||||
else:
|
||||
return self.stage.source_path
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
args = []
|
||||
|
||||
if spec.satisfies("@3.5.0"):
|
||||
args.append(
|
||||
"-DCMAKE_PREFIX_PATH={0}/include/hsa;{1}/include,".format(
|
||||
spec["hsa-rocr-dev"].prefix, spec["hsakmt-roct"].prefix
|
||||
)
|
||||
)
|
||||
|
||||
if spec.satisfies("@3.7.0:5.1"):
|
||||
if spec.satisfies("@:5.1"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", spec["hip"].prefix.cmake))
|
||||
elif spec.satisfies("@5.2.0:"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", spec["hip"].prefix.lib.cmake.hip))
|
||||
|
|
|
@ -36,82 +36,11 @@ class RocmDeviceLibs(CMakePackage):
|
|||
version("5.2.0", sha256="901674bc941115c72f82c5def61d42f2bebee687aefd30a460905996f838e16c")
|
||||
version("5.1.3", sha256="c41958560ec29c8bf91332b9f668793463904a2081c330c0d828bf2f91d4f04e")
|
||||
version("5.1.0", sha256="47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="49cfa8f8fc276ba27feef40546788a2aabe259a924a97af8bef24e295d19aa5e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="83ed7aa1c9322b4fc1f57c48a63fc7718eb4195ee6fde433009b4bc78cb363f0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="50e9e87ecd6b561cad0d471295d29f7220e195528e567fcabe2ec73838979f61",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="78412fb10ceb215952b5cc722ed08fa82501b5848d599dc00744ae1bdc196f77",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="a7291813168e500bfa8aaa5d1dccf5250764ddfe27535def01b51eb5021d4592",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="34a2ac39b9bb7cfa8175cbab05d30e7f3c06aaffce99eed5f79c616d0f910f5f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="f5f5aa6bfbd83ff80a968fa332f80220256447c4ccb71c36f1fbd2b4a8e9fc1b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="d0aa495f9b63f6d8cf8ac668f4dc61831d996e9ae3f15280052a37b9d7670d2a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="e82cc9a8eb7d92de02cabb856583e28f17a05c8cf9c97aec5275608ef1a38574",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="b3a114180bf184b3b829c356067bc6a98021d52c1c6f9db6bc57272ebafc5f1d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="dce3a4ba672c4a2da4c2260ee4dc96ff6dd51877f5e7e1993cb107372a35a378",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.13.4:", type="build", when="@3.9.0:")
|
||||
depends_on("cmake@3.4.3:", type="build")
|
||||
depends_on("cmake@3.13.4:", type="build")
|
||||
|
||||
depends_on("zlib-api", type="link", when="@3.9.0:")
|
||||
depends_on("texinfo", type="link", when="@3.9.0:")
|
||||
depends_on("zlib-api", type="link")
|
||||
depends_on("texinfo", type="link")
|
||||
|
||||
depends_on("rocm-cmake@3.5.0:", type="build")
|
||||
|
||||
|
@ -120,20 +49,6 @@ class RocmDeviceLibs(CMakePackage):
|
|||
depends_on("llvm-amdgpu ~rocm-device-libs")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -153,10 +68,10 @@ class RocmDeviceLibs(CMakePackage):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
|
|
@ -35,76 +35,6 @@ class RocmGdb(AutotoolsPackage):
|
|||
version("5.2.0", sha256="70c5b443292b9bb114844eb63b72cfab1b65f083511ee39d55db7a633c63bf5a")
|
||||
version("5.1.3", sha256="81f5e368facdcc424a37cb5809f0b436bedb9a6d9af4d17785b3c446ab0a7821")
|
||||
version("5.1.0", sha256="cf638149b269f838aaec59c5801098b9c0fc42f6c86a39309a8995b56978b424")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="0eced8cd5a2996cb4bcf254f2bd9defe24112d21c2f750e98f784ecdf94ba5c9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="aa311fb557bd95e35c6e4dfd245188f35c294a93bacb77fe4d3b178b1d0097e8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="e278abf50f1758ce396b26a6719d0af09a6053c195516a44ec9b2be925d79203",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="dd37c8b1ea6bb41b1263183637575d7bf4746cabc573dbff888e23b0379877b0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="995756a24b1e1510647dac1476a3a9a8e3af8e9fd9f4af1d00dd2db28e7a4ef2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="8ee0667ab2cd91b2cc41d3a7af046d36a6b4e2007f050265aa65e0aedec83fd7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="4bc579584a1f8614111e7e44d8aa1c6d5d06be3f5db055aba2cf1abc140122ac",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="28dc806e48695d654d52fb1a634df6d4c1243f00846ae90161e7a5e9f4d88b24",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="b90291b0a8409fe66d8a65d2731dcb87b9f5a22bac9ce3ffbab726eb129ba13d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="05455cb47dd42404ee8bba047def6a6846a7e877e7a7db8dcffc7100d5ba16f0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="0765c96439c0efa145418d210d865b9faed463466d7522274959cc4476a37097",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="a7c11dc30c952587c616bf7769bad603c3bf80522afc8b73ccda5b78d27bed41",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="7a29ef584fd7b6c66bb03aaf8ec2f5a8c758370672a28a4d0d95066e5f6fbdc1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="cf36d956e84c7a5711b71f281a44b0a9708e13e941d8fca0247d01567e7ee7d1",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("texinfo", type="build")
|
||||
|
@ -115,23 +45,9 @@ class RocmGdb(AutotoolsPackage):
|
|||
depends_on("python", type=("build", "link"))
|
||||
depends_on("zlib-api", type="link")
|
||||
depends_on("babeltrace@1.2.4", type="link")
|
||||
depends_on("gmp", type=("build", "link"), when="@4.5.0:")
|
||||
depends_on("gmp", type=("build", "link"))
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -149,11 +65,11 @@ class RocmGdb(AutotoolsPackage):
|
|||
"5.7.1",
|
||||
"6.0.0",
|
||||
]:
|
||||
depends_on("rocm-dbgapi@" + ver, type="link", when="@" + ver)
|
||||
depends_on("comgr@" + ver, type="link", when="@" + ver)
|
||||
depends_on(f"rocm-dbgapi@{ver}", type="link", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", type="link", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
build_directory = "spack-build"
|
||||
|
||||
|
|
|
@ -53,80 +53,10 @@ def url_for_version(self, version):
|
|||
version("5.2.0", sha256="80f73387effdcd987a150978775a87049a976aa74f5770d4420847b004dd59f0")
|
||||
version("5.1.3", sha256="44a7fac721abcd93470e1a7e466bdea0c668c253dee93e4f1ea9a72dbce4ba31")
|
||||
version("5.1.0", sha256="362d81303048cf7ed5d2f69fb65ed65425bc3da4734fff83e3b8fbdda51b0927")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="3edb1992ba28b4a7f82dd66fbd121f62bd859c1afb7ceb47fa856bd68feedc95",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="2aa3a628b336461f83866c4e76225ef5338359e31f802987699d6308515ae1be",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="96b43f314899707810db92149caf518bdb7cf39f7c0ad86e98ad687ffb0d396d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="3a163aed24619b3faf5e8ba17325bdcedd1667a904ea20914ac6bdd33fcdbca8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="7f98f7d4707b4392f8aa7017aaca9e27cb20263428a1a81fb7ec7c552e60c4ca",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="d37bddcc6835b6c0fecdf4d02c204ac1d312076f3eef2b1faded1c4c1bc651e9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="18133451948a83055ca5ebfb5ba1bd536ed0bcb611df98829f1251a98a38f730",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="0729e6c2adf1e3cf649dc6e679f9cb936f4f423f4954ad9852857c0a53ef799c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="d43ea5898c6b9e730b5efabe8367cc136a9260afeac5d0fe85b481d625dd7df1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="3aa9dc5a5f570320b04b35ee129ce9ff21062d2770df934c6c307913f975e93d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="286ff64304905384ce524cd8794c28aee216befd6c9267d4187a12e5a21e2daf",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="7f75dd1abf3d771d554b0e7b0a7d915ab5f11a74962c92b013ee044a23c1270a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="283e1dfe4c3d2e8af4d677ed3c20e975393cdb0856e3ccd77b9c7ed2a151650b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="511b617d5192f2d4893603c1a02402b2ac9556e9806ff09dd2a91d398abf39a0",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("gl@4.5:", type="link")
|
||||
depends_on("numactl", type="link", when="@3.7.0:")
|
||||
depends_on("numactl", type="link")
|
||||
|
||||
for d_version, d_shasum in [
|
||||
("5.6.1", "cc9a99c7e4de3d9360c0a471b27d626e84a39c9e60e0aff1e8e1500d82391819"),
|
||||
|
@ -142,52 +72,20 @@ def url_for_version(self, version):
|
|||
("5.2.0", "37f5fce04348183bce2ece8bac1117f6ef7e710ca68371ff82ab08e93368bafb"),
|
||||
("5.1.3", "ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48"),
|
||||
("5.1.0", "f4f265604b534795a275af902b2c814f416434d9c9e16db81b3ed5d062187dfa"),
|
||||
("5.0.2", "34decd84652268dde865f38e66f8fb4750a08c2457fea52ad962bced82a03e5e"),
|
||||
("5.0.0", "6b72faf8819628a5c109b2ade515ab9009606d10f11316f0d7e4c4c998d7f724"),
|
||||
("4.5.2", "6581916a3303a31f76454f12f86e020fb5e5c019f3dbb0780436a8f73792c4d1"),
|
||||
("4.5.0", "ca8d6305ff0e620d9cb69ff7ac3898917db9e9b6996a7320244b48ab6511dd8e"),
|
||||
]:
|
||||
resource(
|
||||
name="rocclr",
|
||||
url="https://github.com/ROCm/ROCclr/archive/rocm-{0}.tar.gz".format(d_version),
|
||||
url=f"https://github.com/ROCm/ROCclr/archive/rocm-{d_version}.tar.gz",
|
||||
sha256=d_shasum,
|
||||
expand=True,
|
||||
destination="",
|
||||
placement="rocclr",
|
||||
when="@{0}".format(d_version),
|
||||
when=f"@{d_version}",
|
||||
)
|
||||
# Patch to set package installation path for OpenCL.
|
||||
patch("0001-fix-build-error-rocm-opencl-5.1.0.patch", when="@5.1.0:5.1")
|
||||
patch("0001-fix-build-error-rocm-opencl-5.1.0.patch", when="@5.1")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"master",
|
||||
]:
|
||||
depends_on("hip-rocclr@" + ver, type="build", when="@" + ver)
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -207,55 +105,24 @@ def url_for_version(self, version):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("comgr@" + ver, type="build", when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, type="link", when="@" + ver)
|
||||
depends_on(f"comgr@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", type="link", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
# The includes are messed up in ROCm 3.5.0:
|
||||
# ROCM-OpenCL-Runtime uses flat includes
|
||||
# and the find_package(ROCclr) bit it
|
||||
# commented out. So instead we provide
|
||||
# all the includes...
|
||||
|
||||
if self.spec.satisfies("@:4.3.2") and name in ("cflags", "cxxflags"):
|
||||
rocclr = self.spec["hip-rocclr"].prefix
|
||||
extra_includes = [
|
||||
"include",
|
||||
"include/compiler/lib/include",
|
||||
"include/elf",
|
||||
"compiler/lib",
|
||||
"compiler/lib/include",
|
||||
"elf/utils/libelf",
|
||||
"elf/utils/common",
|
||||
]
|
||||
|
||||
for p in extra_includes:
|
||||
flag = "-I {0}".format(join_path(rocclr, p))
|
||||
flags.append(flag)
|
||||
|
||||
return (flags, None, None)
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
args = ["-DUSE_COMGR_LIBRARY=yes", "-DBUILD_TESTS=ON"]
|
||||
if self.spec.satisfies("@:4.3.0"):
|
||||
"-DROCclr_DIR={0}".format(self.spec["hip-rocclr"].prefix),
|
||||
"-DLIBROCclr_STATIC_DIR={0}/lib".format
|
||||
(self.spec["hip-rocclr"].prefix)
|
||||
if self.spec.satisfies("@4.5:5.6"):
|
||||
if self.spec.satisfies("@:5.6"):
|
||||
args.append(self.define("ROCCLR_PATH", self.stage.source_path + "/rocclr"))
|
||||
args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path))
|
||||
if self.spec.satisfies("@5.7:"):
|
||||
|
|
|
@ -15,17 +15,6 @@
|
|||
# For example array[0] = 3.9.0, array[1] = 3.10.0, etc.
|
||||
|
||||
aomp = [
|
||||
"377ab59b685a73b3f95fba95f5e028678ec5aafabc4177b7f0ffb78da095d679",
|
||||
"808fca9bdefb109d5bcbbc9f5b59c564a6d422488869e986516f2a7233eda235",
|
||||
"aa75455cf1d333419e5310117678e5789c5222f7cb05b05e3dfacef855c55d84",
|
||||
"9e6ed2c7bdc3b4af069751b5d3e92913fd5ac318ae844f68bd78c5def990a8f7",
|
||||
"c368d39ba9c1bc8b0edbe66edaa3f2a4ff5649c2bd16f499ac19dfd1591dec5a",
|
||||
"c2b1a61a15fdf8d50c7c7a1ad75512f059c53a7bd5afe85f69e984f1174aa74a",
|
||||
"2092fd210160986127c302c2d636bf5f58ba3a946d27a8474593fa7f87603950",
|
||||
"27a5794b5885c61dc6f63cec36673b37deb029754d3b2fd3e1b21239efffa96a",
|
||||
"ce90b9560205f58f50e72615cd937f02041f4eb2ff66ab445ce3b9faf4f4fa4c",
|
||||
"2439473fb18bfd404eadd222e5955d0fcdf410a9efc5509696bf7b2780f3c894",
|
||||
"64669ac448c439e89ec4b6e0506158e6d9b5a3edfae05882aee4c9bcd5f187b7",
|
||||
"e69fe0c933cb30daafe49d9f1df71fe16f387e0287bba921995feeefdf9ac262",
|
||||
"8bab3d621343f419b29043ac0cb56e062f114991dc3ec1e33e786f771deecc8f",
|
||||
"20e21312816272222d1f427ea72a99a9a67077078552f5e2638a40860d161d25",
|
||||
|
@ -46,17 +35,6 @@
|
|||
]
|
||||
|
||||
devlib = [
|
||||
"c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7",
|
||||
"bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc",
|
||||
"d0aa495f9b63f6d8cf8ac668f4dc61831d996e9ae3f15280052a37b9d7670d2a",
|
||||
"f5f5aa6bfbd83ff80a968fa332f80220256447c4ccb71c36f1fbd2b4a8e9fc1b",
|
||||
"34a2ac39b9bb7cfa8175cbab05d30e7f3c06aaffce99eed5f79c616d0f910f5f",
|
||||
"055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2",
|
||||
"a7291813168e500bfa8aaa5d1dccf5250764ddfe27535def01b51eb5021d4592",
|
||||
"78412fb10ceb215952b5cc722ed08fa82501b5848d599dc00744ae1bdc196f77",
|
||||
"50e9e87ecd6b561cad0d471295d29f7220e195528e567fcabe2ec73838979f61",
|
||||
"83ed7aa1c9322b4fc1f57c48a63fc7718eb4195ee6fde433009b4bc78cb363f0",
|
||||
"49cfa8f8fc276ba27feef40546788a2aabe259a924a97af8bef24e295d19aa5e",
|
||||
"47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f",
|
||||
"c41958560ec29c8bf91332b9f668793463904a2081c330c0d828bf2f91d4f04e",
|
||||
"901674bc941115c72f82c5def61d42f2bebee687aefd30a460905996f838e16c",
|
||||
|
@ -77,17 +55,6 @@
|
|||
]
|
||||
|
||||
llvm = [
|
||||
"1ff14b56d10c2c44d36c3c412b190d3d8cd1bb12cfc7cd58af004c16fd9987d1",
|
||||
"8262aff88c1ff6c4deb4da5a4f8cda1bf90668950e2b911f93f73edaee53b370",
|
||||
"aa1f80f429fded465e86bcfaef72255da1af1c5c52d58a4c979bc2f6c2da5a69",
|
||||
"244e38d824fa7dfa8d0edf3c036b3c84e9c17a16791828e4b745a8d31eb374ae",
|
||||
"751eca1d18595b565cfafa01c3cb43efb9107874865a60c80d6760ba83edb661",
|
||||
"1567d349cd3bcd2c217b3ecec2f70abccd5e9248bd2c3c9f21d4cdb44897fc87",
|
||||
"b53c6b13be7d77dc93a7c62e4adbb414701e4e601e1af2d1e98da4ee07c9837f",
|
||||
"b71451bf26650ba06c0c5c4c7df70f13975151eaa673ef0cc77c1ab0000ccc97",
|
||||
"36a4f7dd961cf373b743fc679bdf622089d2a905de2cfd6fd6c9e7ff8d8ad61f",
|
||||
"bca2db4aaab71541cac588d6a708fde60f0ebe744809bde8a3847044a1a77413",
|
||||
"99a14394b406263576ed3d8d10334de7c78d42b349109f375d178b11492eecaf",
|
||||
"db5d45c4a7842a908527c1b7b8d4a40c688225a41d23cfa382eab23edfffdd10",
|
||||
"d236a2064363c0278f7ba1bb2ff1545ee4c52278c50640e8bb2b9cfef8a2f128",
|
||||
"0f892174111b78a02d1a00f8f46d9f80b9abb95513a7af38ecf2a5a0882fe87f",
|
||||
|
@ -108,17 +75,6 @@
|
|||
]
|
||||
|
||||
flang = [
|
||||
"5d113f44fb173bd0d5704b282c5cebbb2aa642c7c29f188764bfa1daa58374c9",
|
||||
"3990d39ff1c908b150f464f0653a123d94be30802f9cad6af18fbb560c4b412e",
|
||||
"f3e19699ce4ac404f41ffe08ef4546e31e2e741d8deb403b5477659e054275d5",
|
||||
"f41f661425534b5cfb20e2c0efd9d0800609dc3876ee9c3f76f026d36abbfa35",
|
||||
"d6c3f3aaa289251a433d99d1cffe432812093089ae876a6863295a15066c1eaf",
|
||||
"13d3525078fd1c569f7c8ea7fce439b04f6b03814bbe88600c08f95c788e7802",
|
||||
"13d3525078fd1c569f7c8ea7fce439b04f6b03814bbe88600c08f95c788e7802",
|
||||
"3d7277fd658e51e7e43272c4b319e733c18f5a6d11f739aaec0df758a720809e",
|
||||
"54bc3e668577fc30ef77f0c95436e9f9327f256ac8c43eee35eb90000883c6d3",
|
||||
"e8d7f828e10516666606bcf2459a25f69401f12f0ae4d3b4a0ca57616bbd9bb0",
|
||||
"9b9a53150009ff58bd0ab665b970dbebc51be891343fd5dc8e77a2133ac44333",
|
||||
"d95e36f3b93097ab6fb319c744ddc71cd94af0c358accc1e5224c2bbd431266d",
|
||||
"d7847b5c6e1344dc0b4723dbe76a859257b4c242644dedb34e425f07738530d4",
|
||||
"20f48cac9b58496230fa2428eba4e15ec0a6e92d429569b154a328b7a8c5da17",
|
||||
|
@ -139,17 +95,6 @@
|
|||
]
|
||||
|
||||
extras = [
|
||||
"830a37cf1c6700f81fc00749206a37e7cda4d2867bbdf489e9e2d81f52d06b3d",
|
||||
"5d98d34aff97416d8b5b9e16e7cf474580f8de8a73bd0e549c4440a3c5df4ef5",
|
||||
"51cc8a7c5943e1d9bc657fc9b9797f45e3ce6a4e544d3d3a967c7cd0185a0510",
|
||||
"91fdfadb94aa6afc1942124d0953ddc80c297fa75de1897fb42ac8e7dea51ab9",
|
||||
"31bbe70b51c259a54370d021ae63528a1740b5477a22412685afd14150fff6f4",
|
||||
"ec6cc4a9c24f098496de3206714dafe9a714f06afacfe21d53a4e6344f9cb4c9",
|
||||
"ec6cc4a9c24f098496de3206714dafe9a714f06afacfe21d53a4e6344f9cb4c9",
|
||||
"a9c32fb7659c0aabba5b1e76ec05037dda485bf893cef4144279b42ef8fae416",
|
||||
"2b7ae80dda7ffee63210855bc2746c8a13063777c9b855a562eedca4e7ab6254",
|
||||
"9dfaee1eeee2141d4873f7d71fcaeacabe91f1418cb3bed19653e847921944e4",
|
||||
"a4affb77bebaafb6f8d22c51d66aa6fa05381ec54cc1e14a4b10e0f3dc00157f",
|
||||
"c3a2a83d8f586ee765df96a692ebe010631446f700273fa31738ea260dfc35f7",
|
||||
"2e3151a47d77166d071213af2a1691487691aae0abd5c1718d818a6d7d09cb2d",
|
||||
"817c2e8975e56a8875ff56f9d1ea34d5e7e50f1b541b7f1236e3e5c8d9eee47f",
|
||||
|
@ -170,17 +115,6 @@
|
|||
]
|
||||
|
||||
versions = [
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -238,17 +172,6 @@ class RocmOpenmpExtras(Package):
|
|||
version("5.2.0", sha256=versions_dict["5.2.0"]["aomp"], deprecated=True)
|
||||
version("5.1.3", sha256=versions_dict["5.1.3"]["aomp"], deprecated=True)
|
||||
version("5.1.0", sha256=versions_dict["5.1.0"]["aomp"], deprecated=True)
|
||||
version("5.0.2", sha256=versions_dict["5.0.2"]["aomp"], deprecated=True)
|
||||
version("5.0.0", sha256=versions_dict["5.0.0"]["aomp"], deprecated=True)
|
||||
version("4.5.2", sha256=versions_dict["4.5.2"]["aomp"], deprecated=True)
|
||||
version("4.5.0", sha256=versions_dict["4.5.0"]["aomp"], deprecated=True)
|
||||
version("4.3.1", sha256=versions_dict["4.3.1"]["aomp"], deprecated=True)
|
||||
version("4.3.0", sha256=versions_dict["4.3.0"]["aomp"], deprecated=True)
|
||||
version("4.2.0", sha256=versions_dict["4.2.0"]["aomp"], deprecated=True)
|
||||
version("4.1.0", sha256=versions_dict["4.1.0"]["aomp"], deprecated=True)
|
||||
version("4.0.0", sha256=versions_dict["4.0.0"]["aomp"], deprecated=True)
|
||||
version("3.10.0", sha256=versions_dict["3.10.0"]["aomp"], deprecated=True)
|
||||
version("3.9.0", sha256=versions_dict["3.9.0"]["aomp"], deprecated=True)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("py-setuptools", type="build")
|
||||
|
@ -261,17 +184,6 @@ class RocmOpenmpExtras(Package):
|
|||
depends_on("numactl", when="@5.7:6.0")
|
||||
|
||||
for ver in [
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -290,58 +202,54 @@ class RocmOpenmpExtras(Package):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("comgr@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@{0} ~openmp".format(ver), when="@" + ver)
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver} ~openmp", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
# tag changed to 'rocm-' in 4.0.0
|
||||
if ver == "3.9.0" or ver == "3.10.0":
|
||||
tag = "rocm-uc-"
|
||||
else:
|
||||
tag = "rocm-"
|
||||
tag = "rocm-"
|
||||
|
||||
resource(
|
||||
name="rocm-device-libs",
|
||||
url=compute_url + "/ROCm-Device-Libs/archive/" + tag + ver + ".tar.gz",
|
||||
url=f"{compute_url}/ROCm-Device-Libs/archive/rocm-{ver}.tar.gz",
|
||||
sha256=versions_dict[ver]["devlib"],
|
||||
expand=True,
|
||||
destination="rocm-openmp-extras",
|
||||
placement="rocm-device-libs",
|
||||
when="@" + ver,
|
||||
when=f"@{ver}",
|
||||
)
|
||||
|
||||
resource(
|
||||
name="flang",
|
||||
url=tools_url + "/flang/archive/" + tag + ver + ".tar.gz",
|
||||
url=f"{tools_url}/flang/archive/{ver}.tar.gz",
|
||||
sha256=versions_dict[ver]["flang"],
|
||||
expand=True,
|
||||
destination="rocm-openmp-extras",
|
||||
placement="flang",
|
||||
when="@" + ver,
|
||||
when=f"@{ver}",
|
||||
)
|
||||
|
||||
resource(
|
||||
name="aomp-extras",
|
||||
url=tools_url + "/aomp-extras/archive/" + tag + ver + ".tar.gz",
|
||||
url=f"{tools_url}/aomp-extras/archive/{ver}.tar.gz",
|
||||
sha256=versions_dict[ver]["extras"],
|
||||
expand=True,
|
||||
destination="rocm-openmp-extras",
|
||||
placement="aomp-extras",
|
||||
when="@" + ver,
|
||||
when=f"@{ver}",
|
||||
)
|
||||
|
||||
resource(
|
||||
name="llvm-project",
|
||||
url=compute_url + "/llvm-project/archive/rocm-" + ver + ".tar.gz",
|
||||
url=f"{compute_url}/llvm-project/archive/rocm-{ver}.tar.gz",
|
||||
sha256=versions_dict[ver]["llvm"],
|
||||
expand=True,
|
||||
destination="rocm-openmp-extras",
|
||||
placement="llvm-project",
|
||||
when="@" + ver,
|
||||
when=f"@{ver}",
|
||||
)
|
||||
patch("0001-Linking-hsakmt-libdrm-and-numactl-libraries.patch", when="@5.7:6.0")
|
||||
|
||||
|
@ -357,10 +265,7 @@ def setup_run_environment(self, env):
|
|||
if self.spec.satisfies("@5.3.0:"):
|
||||
env.prepend_path("LD_LIBRARY_PATH", "{0}/lib".format(openmp_extras_prefix))
|
||||
env.prepend_path("LD_LIBRARY_PATH", "{0}/lib".format(hsa_prefix))
|
||||
if self.spec.version < Version("4.1.0"):
|
||||
env.set("AOMP_GPU", "`{0}/rocm-bin/mygpu`".format(openmp_extras_prefix))
|
||||
else:
|
||||
env.set("AOMP_GPU", "`{0}/bin/mygpu`".format(openmp_extras_prefix))
|
||||
env.set("AOMP_GPU", "`{0}/bin/mygpu`".format(openmp_extras_prefix))
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
openmp_extras_prefix = self.spec["rocm-openmp-extras"].prefix
|
||||
|
@ -379,15 +284,7 @@ def patch(self):
|
|||
libomptarget = "{0}/rocm-openmp-extras/llvm-project/openmp/libomptarget"
|
||||
flang = "{0}/rocm-openmp-extras/flang/"
|
||||
|
||||
if self.spec.version >= Version("4.3.0") and self.spec.version < Version("5.0.0"):
|
||||
filter_file(
|
||||
"STRIP ${FLANG_SHA}", "STRIP 0", flang.format(src) + "CMakeLists.txt", string=True
|
||||
)
|
||||
|
||||
if self.spec.version < Version("4.1.0"):
|
||||
plugin = "/plugins/hsa/CMakeLists.txt"
|
||||
else:
|
||||
plugin = "/plugins/amdgpu/CMakeLists.txt"
|
||||
plugin = "/plugins/amdgpu/CMakeLists.txt"
|
||||
|
||||
if self.spec.version < Version("5.2.0"):
|
||||
filter_file(
|
||||
|
@ -397,44 +294,27 @@ def patch(self):
|
|||
libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
|
||||
)
|
||||
|
||||
# Libm moved into llvm-project in 4.5.0
|
||||
if self.spec.version < Version("4.5.0"):
|
||||
filter_file(
|
||||
"{ROCM_DIR}/amdgcn/bitcode",
|
||||
"{DEVICE_LIBS_DIR}",
|
||||
aomp_extras.format(src) + "/libm/CMakeLists.txt",
|
||||
)
|
||||
|
||||
# Openmp adjustments
|
||||
# Fix relocation error with libffi by not using static lib.
|
||||
if self.spec.version >= Version("5.1.0"):
|
||||
filter_file(
|
||||
"libffi.a",
|
||||
"",
|
||||
libomptarget.format(src) + "/cmake/Modules/LibomptargetGetDependencies.cmake",
|
||||
)
|
||||
filter_file(
|
||||
"libffi.a",
|
||||
"",
|
||||
libomptarget.format(src) + "/cmake/Modules/LibomptargetGetDependencies.cmake",
|
||||
)
|
||||
|
||||
if self.spec.version >= Version("5.0.0"):
|
||||
filter_file(
|
||||
"{OPENMP_INSTALL_LIBDIR}",
|
||||
"{OPENMP_INSTALL_LIBDIR}/libdevice",
|
||||
libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
|
||||
)
|
||||
filter_file(
|
||||
r"{OPENMP_INSTALL_LIBDIR}",
|
||||
"{OPENMP_INSTALL_LIBDIR}/libdevice",
|
||||
libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
|
||||
)
|
||||
|
||||
if self.spec.version <= Version("5.1.3"):
|
||||
filter_file(
|
||||
"{ROCM_DIR}/amdgcn/bitcode",
|
||||
r"{ROCM_DIR}/amdgcn/bitcode",
|
||||
"{DEVICE_LIBS_DIR}",
|
||||
libomptarget.format(src) + "/deviceRTLs/libm/CMakeLists.txt",
|
||||
)
|
||||
|
||||
if self.spec.version <= Version("4.5.0"):
|
||||
filter_file(
|
||||
"dl elf",
|
||||
"dl ${LIBOMPTARGET_DEP_LIBELF_LIBRARIES}",
|
||||
libomptarget.format(src) + "/plugins/amdgpu/CMakeLists.txt",
|
||||
)
|
||||
|
||||
filter_file(
|
||||
"-nogpulib",
|
||||
"-nogpulib -nogpuinc",
|
||||
|
@ -591,6 +471,7 @@ def install(self, spec, prefix):
|
|||
"-DCMAKE_C_FLAGS=-isystem{0} -I{1}".format(elfutils_inc, ffi_inc),
|
||||
"-DCMAKE_CXX_FLAGS=-isystem{0} -I{1}".format(elfutils_inc, ffi_inc),
|
||||
"-DNEW_BC_PATH=1",
|
||||
"-DHSA_INCLUDE={0}/include/hsa".format(hsa_prefix),
|
||||
]
|
||||
if self.spec.satisfies("@5.7:6.0"):
|
||||
openmp_common_args += [
|
||||
|
@ -598,10 +479,6 @@ def install(self, spec, prefix):
|
|||
"-DHSAKMT_INC_PATH={0}/include".format(hsakmt_prefix),
|
||||
"-DNUMACTL_DIR={0}".format(numactl_prefix),
|
||||
]
|
||||
if self.spec.version < Version("4.1.0"):
|
||||
openmp_common_args += ["-DHSA_INCLUDE={0}".format(hsa_prefix)]
|
||||
else:
|
||||
openmp_common_args += ["-DHSA_INCLUDE={0}/include/hsa".format(hsa_prefix)]
|
||||
|
||||
if self.spec.satisfies("@5.3.0:"):
|
||||
openmp_common_args += ["-DLIBOMPTARGET_ENABLE_DEBUG=ON"]
|
||||
|
@ -626,14 +503,11 @@ def install(self, spec, prefix):
|
|||
"-DCMAKE_C_COMPILER={0}/clang".format(bin_dir),
|
||||
"-DCMAKE_Fortran_COMPILER={0}/flang".format(bin_dir),
|
||||
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;x86",
|
||||
]
|
||||
if self.spec.version >= Version("4.2.0"):
|
||||
# Spack thinks some warnings from the flang build are errors.
|
||||
# Disable those warnings in C and CXX flags.
|
||||
flang_common_args += [
|
||||
"-DCMAKE_CXX_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
|
||||
"-DCMAKE_C_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
|
||||
]
|
||||
"-DCMAKE_CXX_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
|
||||
"-DCMAKE_C_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
|
||||
]
|
||||
|
||||
components["pgmath"] = ["../rocm-openmp-extras/flang/runtime/libpgmath"]
|
||||
|
||||
|
|
|
@ -43,85 +43,15 @@ class RocmSmiLib(CMakePackage):
|
|||
version("5.2.0", sha256="7bce567ff4e087598eace2cae72d24c98b2bcc93af917eafa61ec9d1e8ef4477")
|
||||
version("5.1.3", sha256="8a19ce60dc9221545aa50e83e88d8c4be9bf7cde2425cefb13710131dc1d7b1b")
|
||||
version("5.1.0", sha256="21b31b43015b77a9119cf4c1d4ff3864f9ef1f34e2a52a38f985a3f710dc5f87")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="a169129e4ecd1cca134039dc1bf91e1b3721768781abfae4ae61fad60a633472",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="9d0e560072f815b441528a5d6124e901570a5a04e9cff1f21329861609b37203",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="d4a34db26852defb62817aa44f08ef96d678c63a6f33425bc9d48c18e5e37b7a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="43a2cc2ec548cc28698ca4fa01a947a4414febd433936a8d9770bf6f6ed55e4f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="ea2f9d8a9999e4aac1cb969e6bf2a9f0b6d02f29d0c319b36cce26412ab8a8b0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="c3ff56a14d334cb688a2e9a748dac46d9c2f7f576fe1f53416b1a0edbe842f8b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="c31bf91c492f00d0c5ab21e45afbd7baa990e4a8d7ce9b01e3b988e5fdd53f50",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="0c1d2152e40e14bb385071ae16e7573290fb9f74afa5ab887c54f4dd75849a6b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="93d19229b5a511021bf836ddc2a9922e744bf8ee52ee0e2829645064301320f4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="8bb2142640d1c6bf141f19accf809e61377a6e0c0222e47ac4daa5da2c85ddac",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="b2934b112542af56de2dc1d5bffff59957e21050db6e3e5abd4c99e46d4a0ffe",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="86250c9ae9dfb18d4f7259a5f2f09b21574d4996fe5034a739ce63a27acd0082",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="72d2a3deda0b55a2d92833cd648f50c7cb64f8341b254a0badac0152b26f1391",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="a5d2ec3570d018b60524f0e589c4917f03d26578443f94bde27a170c7bb21e6e",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant("shared", default=True, description="Build shared or static library")
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("python@3:", type=("build", "run"), when="@3.9.0:")
|
||||
depends_on("python@3:", type=("build", "run"))
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
patch("disable_pdf_generation_with_doxygen_and_latex.patch", when="@4.5.2:5.6")
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
patch("disable_pdf_generation_with_doxygen_and_latex.patch", when="@:5.6")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
|
@ -134,12 +64,10 @@ def cmake_args(self):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
@run_after("install")
|
||||
def post_install(self):
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
From 3611b904b0f9816e722b8bca779f68ae96d45d27 Mon Sep 17 00:00:00 2001
|
||||
From: sreenivasaMurthy Kolam <sreenivasamurthy.kolam@amd.com>
|
||||
Date: Thu, 22 Oct 2020 03:31:29 -0700
|
||||
Subject: [PATCH] fix compile error
|
||||
|
||||
---
|
||||
Tensile/Source/lib/include/Tensile/llvm/YAML.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp b/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
|
||||
index 16e64ff9..0d00f470 100644
|
||||
--- a/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
|
||||
+++ b/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
|
||||
@@ -261,7 +261,7 @@ namespace llvm
|
||||
|
||||
static void inputOne(IO& io, StringRef key, Hide<T>& value)
|
||||
{
|
||||
- Impl::inputOne(io, key, *value);
|
||||
+ Impl::inputOne(io, key.str(), *value);
|
||||
}
|
||||
|
||||
static void output(IO& io, Hide<T>& value)
|
||||
--
|
||||
2.22.0
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
diff --git a/HostLibraryTests/CMakeLists.txt b/HostLibraryTests/CMakeLists.txt
|
||||
index 79e1529..034f8bb 100644
|
||||
--- a/HostLibraryTests/CMakeLists.txt
|
||||
+++ b/HostLibraryTests/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@
|
||||
# CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
################################################################################
|
||||
|
||||
-cmake_minimum_required(VERSION 3.5)
|
||||
+cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
project(TensileHostLibraryTest)
|
||||
|
||||
@@ -78,21 +78,7 @@ if(TENSILE_USE_HIP)
|
||||
endif()
|
||||
|
||||
if(TENSILE_USE_OPENMP)
|
||||
- #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_OPENMP")
|
||||
- find_package(OpenMP QUIET)
|
||||
- if (OPENMP_FOUND)
|
||||
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
|
||||
- else()
|
||||
- if(EXISTS /etc/redhat-release)
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp=libgomp")
|
||||
- else()
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||
- set(OPENMP_LIBRARY /usr/lib/x86_64-linux-gnu/libomp.so)
|
||||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENMP_LIBRARY}")
|
||||
- endif()
|
||||
- endif()
|
||||
+ find_package(OpenMP REQUIRED)
|
||||
endif()
|
||||
|
||||
add_subdirectory(configs)
|
||||
@@ -187,6 +173,6 @@ if(TENSILE_USE_HIP)
|
||||
endif()
|
||||
|
||||
if(TENSILE_USE_OPENMP)
|
||||
- target_link_libraries(TensileTests PRIVATE "${OpenMP_EXE_LINKER_FLAGS}")
|
||||
+ target_link_libraries(TensileTests PRIVATE OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
|
||||
diff --git a/Tensile/Source/CMakeLists.txt b/Tensile/Source/CMakeLists.txt
|
||||
index 821fd53..fe65c9e 100644
|
||||
--- a/Tensile/Source/CMakeLists.txt
|
||||
+++ b/Tensile/Source/CMakeLists.txt
|
||||
@@ -61,21 +61,7 @@ if(TENSILE_NEW_CLIENT)
|
||||
endif()
|
||||
|
||||
if(TENSILE_USE_OPENMP)
|
||||
- #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_OPENMP")
|
||||
- find_package(OpenMP QUIET)
|
||||
- if (OPENMP_FOUND)
|
||||
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
|
||||
- else ()
|
||||
- if(EXISTS /etc/redhat-release)
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp=libgomp")
|
||||
- else()
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||
- set(OPENMP_LIBRARY /usr/lib/x86_64-linux-gnu/libomp.so)
|
||||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENMP_LIBRARY}")
|
||||
- endif()
|
||||
- endif()
|
||||
+ find_package(OpenMP REQUIRED)
|
||||
endif()
|
||||
|
||||
#set(TENSILE_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
|
||||
diff --git a/Tensile/Source/client/CMakeLists.txt b/Tensile/Source/client/CMakeLists.txt
|
||||
index 9ccba86..081280b 100644
|
||||
--- a/Tensile/Source/client/CMakeLists.txt
|
||||
+++ b/Tensile/Source/client/CMakeLists.txt
|
||||
@@ -52,12 +52,8 @@ target_link_libraries(TensileClient TensileHost ${Boost_LIBRARIES} rocm_smi)
|
||||
add_executable(tensile_client main.cpp)
|
||||
|
||||
target_link_libraries(tensile_client PRIVATE TensileHost TensileClient ${Boost_LIBRARIES})
|
||||
-if(OpenMP_FOUND)
|
||||
- target_link_libraries(tensile_client PRIVATE "${OpenMP_EXE_LINKER_FLAGS}")
|
||||
-else()
|
||||
- set(OPENMP_LIBRARY /usr/lib/x86_64-linux-gnu/libomp.so)
|
||||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENMP_LIBRARY}")
|
||||
- target_link_libraries(tensile_client PRIVATE "${OpenMP_EXE_LINKER_FLAGS}")
|
||||
+if(TENSILE_USE_OPENMP)
|
||||
+ target_link_libraries(tensile_client PRIVATE OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
|
||||
foreach(arch IN LISTS TENSILE_GPU_ARCHS)
|
|
@ -37,83 +37,9 @@ class RocmTensile(CMakePackage):
|
|||
version("5.2.0", sha256="aa6107944482ad278111d11d2e926393423fc70e7e1838574fe7ad9f553bdacf")
|
||||
version("5.1.3", sha256="87020ca268e3a1ed8853f629839d6497764d862bd70b8775e98de439f6c89f1d")
|
||||
version("5.1.0", sha256="0ac86a623597152c5b1d8bb5634aad3e55afa51959476aaa5e9869d259ddf375")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="c6130de3b02f4f10635d18f913b3b88ea754fce2842c680e9caf5a6781da8f37",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="2a814ee8576ff1f06cc5ac4556300c8e7cbf77ef8c87b56992f3e66d8862f213",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="da20256224749c0a8b44aaede25fbcd66cfeac483081af5d22f1d1fcf49dffc1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="26a27659c864b5372ca4407671c6e8d4be3bbc05c64fc18762ad570cd3b3af1f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="6fce0ac22051a454fe984283766eb473dc50752cd30bad05acb3dbde6ef4f8b1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="911c0cdb0146d43a2a59170e6a803f414a2b68df7d9ff369ab784d11a08d7264",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="198e357a14a79366b27b1097856d4821996bc36163be0cd2668910b253721060",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="92b8ee13dfc11a67d5136227ee985622685790fd3f0f0e1ec6db411d4e9a3419",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="cf105ce8c3e352d19713b3bf8bda77f25c1a692c4f2ca82d631ba15523ecc1cd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="8d5b50aadfa56a9195e4c387b8eb351c9b9b7671b136b624e07fe28db24bd330",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="17a011f8c3433d4f8c2dddabd5854cf96c406d24592b3942deb51672c570882e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="c78a11db85fdf54bfd26533ee6fa98f6a6e789fa423537993061497ac5f22ed6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="488a7f76ea42a7601d0557f53068ec4832a2c7c06bb1b511470a4e35599a5a4d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="71eb3eed6625b08a4cedb539dd9b596e3d4cc82a1a8063d37d94c0765b6f8257",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
tensile_architecture = (
|
||||
"all",
|
||||
"gfx906",
|
||||
"gfx908",
|
||||
"gfx000",
|
||||
"gfx900",
|
||||
"gfx906:xnack-",
|
||||
"gfx908:xnack-",
|
||||
"gfx90a:xnack-",
|
||||
|
@ -131,29 +57,12 @@ class RocmTensile(CMakePackage):
|
|||
multi=True,
|
||||
)
|
||||
variant("openmp", default=True, description="Enable OpenMP")
|
||||
conflicts("tensile_architecture=gfx906", when="@4.0.1:")
|
||||
conflicts("tensile_architecture=gfx908", when="@4.0.1:")
|
||||
depends_on("cmake@3:", type="build")
|
||||
# This is the default library format since 3.7.0
|
||||
depends_on("msgpack-c@3:", when="@3.7:")
|
||||
depends_on("msgpack-c@3:")
|
||||
depends_on("boost", type=("build", "link"))
|
||||
depends_on(Boost.with_default_variants)
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -172,69 +81,15 @@ class RocmTensile(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-cmake@" + ver, type="build", when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("comgr@" + ver, when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, type="build", when="@" + ver)
|
||||
for ver in [
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
"5.2.1",
|
||||
"5.2.3",
|
||||
"5.3.0",
|
||||
"5.3.3",
|
||||
"5.4.0",
|
||||
"5.4.3",
|
||||
"5.5.0",
|
||||
"5.5.1",
|
||||
"5.6.0",
|
||||
"5.6.1",
|
||||
"5.7.0",
|
||||
"5.7.1",
|
||||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-openmp-extras@" + ver, when="@" + ver)
|
||||
|
||||
for ver in ["3.5.0", "3.7.0", "3.8.0", "3.9.0"]:
|
||||
depends_on("rocm-smi@" + ver, type="build", when="@" + ver)
|
||||
|
||||
for ver in [
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
"5.2.1",
|
||||
"5.2.3",
|
||||
"5.3.0",
|
||||
"5.3.3",
|
||||
"5.4.0",
|
||||
"5.4.3",
|
||||
"5.5.0",
|
||||
"5.5.1",
|
||||
"5.6.0",
|
||||
"5.6.1",
|
||||
"5.7.0",
|
||||
"5.7.1",
|
||||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("rocm-smi-lib@" + ver, type="build", when="@" + ver)
|
||||
depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"rocm-openmp-extras@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-smi-lib@{ver}", type="build", when=f"@{ver}")
|
||||
|
||||
root_cmakelists_dir = "Tensile/Source"
|
||||
# Status: https://github.com/ROCm/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087
|
||||
# Not yet landed in 3.7.0, nor 3.8.0.
|
||||
patch("0001-fix-compile-error.patch", when="@3.7.0:3.8.0")
|
||||
patch("0002-require-openmp-when-tensile-use-openmp-is-on.patch", when="@3.9.0:4.0.0")
|
||||
|
||||
patch("0003-require-openmp-extras-when-tensile-use-openmp.patch", when="@5.1.0:")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
|
@ -243,16 +98,7 @@ def setup_build_environment(self, env):
|
|||
|
||||
def get_gpulist_for_tensile_support(self):
|
||||
arch = self.spec.variants["tensile_architecture"].value
|
||||
if arch[0] == "all":
|
||||
if self.spec.satisfies("@:4.0.0"):
|
||||
arch_value = self.tensile_architecture[1:4]
|
||||
elif self.spec.satisfies("@4.1.0:4.2.0"):
|
||||
arch_value = self.tensile_architecture[3:6]
|
||||
elif self.spec.satisfies("@4.3.0:"):
|
||||
arch_value = self.tensile_architecture[3:]
|
||||
return arch_value
|
||||
else:
|
||||
return arch
|
||||
return self.tensile_architecture[1:] if arch[0] == "all" else arch
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
|
@ -262,19 +108,12 @@ def cmake_args(self):
|
|||
self.define("Tensile_CODE_OBJECT_VERSION", "V3"),
|
||||
self.define("Boost_USE_STATIC_LIBS", "OFF"),
|
||||
self.define_from_variant("TENSILE_USE_OPENMP", "openmp"),
|
||||
self.define("BUILD_WITH_TENSILE_HOST", "ON" if "@3.7.0:" in self.spec else "OFF"),
|
||||
self.define("BUILD_WITH_TENSILE_HOST", True),
|
||||
self.define("Tensile_LIBRARY_FORMAT", "msgpack"),
|
||||
self.define("TENSILE_USE_OPENMP", True),
|
||||
self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix),
|
||||
]
|
||||
|
||||
if "@3.7.0:" in self.spec:
|
||||
args.append(self.define("Tensile_LIBRARY_FORMAT", "msgpack"))
|
||||
if "@5.1.0:" in self.spec:
|
||||
args.append(self.define("TENSILE_USE_OPENMP", "ON")),
|
||||
args.append(
|
||||
self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
|
||||
),
|
||||
else:
|
||||
args.append(self.define("TENSILE_USE_OPENMP", "OFF")),
|
||||
|
||||
if self.spec.satisfies("^cmake@3.21.0:"):
|
||||
args.append(
|
||||
self.define("CMAKE_HIP_ARCHITECTURES", self.get_gpulist_for_tensile_support())
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fc4d98e..f1dea96 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -164,7 +164,7 @@ endif()
|
||||
message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" )
|
||||
|
||||
if ( NOT DEFINED CMAKE_PACKAGING_INSTALL_PREFIX )
|
||||
- set (CMAKE_PACKAGING_INSTALL_PREFIX "/opt/rocm" )
|
||||
+ set (CMAKE_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
@@ -369,16 +369,16 @@ if (RVS_ROCBLAS EQUAL 1)
|
||||
set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install")
|
||||
set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/")
|
||||
else()
|
||||
- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include")
|
||||
- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib")
|
||||
+ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include")
|
||||
+ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib")
|
||||
endif()
|
||||
|
||||
if (RVS_ROCMSMI EQUAL 1)
|
||||
set(ROCM_SMI_INC_DIR "${CMAKE_BINARY_DIR}/rvs_smi-src/include")
|
||||
set(ROCM_SMI_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_smi-build")
|
||||
else()
|
||||
- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/rocm_smi/include")
|
||||
- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib")
|
||||
+ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include")
|
||||
+ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib")
|
||||
endif()
|
||||
set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name")
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 07048b8..2bfb6c2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -32,8 +32,7 @@ set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
|
||||
set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
|
||||
set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
|
||||
set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE)
|
||||
-set(HIP_INC_DIR "${ROCM_PATH}/hip" )
|
||||
-set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
|
||||
+set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime")
|
||||
set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
|
||||
|
||||
execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
|
|
@ -1,88 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 780e1f17..35a2b391 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -24,10 +24,21 @@
|
||||
################################################################################
|
||||
|
||||
cmake_minimum_required ( VERSION 3.5.0 )
|
||||
+project ("rocm-validation-suite")
|
||||
if ( ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
message(FATAL "In-source build is not allowed")
|
||||
endif ()
|
||||
|
||||
+enable_testing()
|
||||
+
|
||||
+# Prerequisite - Check if rocblas was already installed
|
||||
+find_package (rocblas)
|
||||
+if(rocblas_FOUND)
|
||||
+ message(STATUS "rocblas found")
|
||||
+else()
|
||||
+ message(FATAL_ERROR "rocblas not found !!! Install rocblas to proceed ...")
|
||||
+endif(rocblas_FOUND)
|
||||
+
|
||||
set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
|
||||
set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
|
||||
set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
|
||||
@@ -36,7 +47,6 @@ set(HIP_INC_DIR "${ROCM_PATH}/hip" )
|
||||
set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
|
||||
set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
|
||||
|
||||
-execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
|
||||
|
||||
#
|
||||
# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their
|
||||
@@ -45,20 +55,17 @@ execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
|
||||
#
|
||||
if(DEFINED CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of
|
||||
-build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
|
||||
-Release RelWithDebInfo MinSizeRel.")
|
||||
+ build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
|
||||
+ Release RelWithDebInfo MinSizeRel.")
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build,
|
||||
-options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
|
||||
-RelWithDebInfo MinSizeRel.")
|
||||
+ options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
|
||||
+ RelWithDebInfo MinSizeRel.")
|
||||
endif()
|
||||
|
||||
-project ("rocm-validation-suite")
|
||||
-enable_testing()
|
||||
#include ( CTest )
|
||||
|
||||
-if (NOT CMAKE_CONFIGURATION_TYPES)
|
||||
-# message( "CMAKE_CONFIGURATION_TYPES not set")
|
||||
+if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
@@ -70,17 +77,15 @@ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rvs_os_helper.sh
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
-if(result)
|
||||
+if (result)
|
||||
message(FATAL_ERROR "Could not obtain OS type: ${result}")
|
||||
endif()
|
||||
message(STATUS "RVS_OS_TYPE: ${RVS_OS_TYPE}")
|
||||
if (${RVS_OS_TYPE} STREQUAL "ubuntu")
|
||||
set(RVS_OS_TYPE_NUM 1)
|
||||
- execute_process(COMMAND sudo apt-get install rocblas --assume-yes)
|
||||
elseif ((${RVS_OS_TYPE} STREQUAL "centos") OR (${RVS_OS_TYPE} STREQUAL "rhel")
|
||||
OR (${RVS_OS_TYPE} STREQUAL "sles"))
|
||||
set(RVS_OS_TYPE_NUM 2)
|
||||
- execute_process(COMMAND sudo yum -y install rocblas )
|
||||
else()
|
||||
set(RVS_OS_TYPE_NUM 0)
|
||||
endif()
|
||||
@@ -89,7 +94,7 @@ message(STATUS "RVS_OS_TYPE_NUM: ${RVS_OS_TYPE_NUM}")
|
||||
## Set default module path if not already set
|
||||
if ( NOT DEFINED CMAKE_MODULE_PATH )
|
||||
set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/" )
|
||||
-endif ()
|
||||
+endif()
|
||||
|
||||
## Include common cmake modules
|
||||
include ( utils )
|
|
@ -1,50 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ff77558..278a732 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -207,36 +207,7 @@ if ( NOT DEFINED CMAKE_PACKAGING_INSTALL_PREFIX )
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
-# Download and unpack yaml-cpp at configure time
|
||||
-configure_file(CMakeYamlDownload.cmake yaml-download/CMakeLists.txt)
|
||||
-execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
|
||||
- RESULT_VARIABLE result
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
|
||||
-if(result)
|
||||
- message(FATAL_ERROR "CMake step for yaml-download failed: ${result}")
|
||||
-endif()
|
||||
-execute_process(COMMAND ${CMAKE_COMMAND} --build .
|
||||
- RESULT_VARIABLE result
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
|
||||
-if(result)
|
||||
- message(FATAL_ERROR "Build step for yaml-download failed: ${result}")
|
||||
-endif()
|
||||
-execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/yaml-src -B${CMAKE_BINARY_DIR}/yaml-build
|
||||
- RESULT_VARIABLE result
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src )
|
||||
-if(result)
|
||||
- message(FATAL_ERROR "Config step for yaml-src failed: ${result}")
|
||||
-endif()
|
||||
|
||||
-add_custom_target(rvs_yaml_target
|
||||
- DEPENDS ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
|
||||
-)
|
||||
-
|
||||
-add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
|
||||
- COMMAND make -C ${CMAKE_BINARY_DIR}/yaml-build
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src
|
||||
- COMMENT "Generating yaml-cpp targets"
|
||||
- VERBATIM)
|
||||
|
||||
################################################################################
|
||||
## GOOGLE TEST
|
||||
@@ -446,7 +417,7 @@ if (RVS_BUILD_TESTS)
|
||||
add_subdirectory(testif.so)
|
||||
endif()
|
||||
|
||||
-add_dependencies(rvshelper rvs_bin_folder rvs_doc rvs_yaml_target)
|
||||
+add_dependencies(rvshelper rvs_bin_folder rvs_doc)
|
||||
|
||||
|
||||
add_dependencies(pesm rvslib rvslibrt)
|
|
@ -40,83 +40,9 @@ class RocmValidationSuite(CMakePackage):
|
|||
version("5.2.0", sha256="2dfef5d66f544230957ac9aaf647b2f1dccf3cc7592cc322cae9fbdcf3321365")
|
||||
version("5.1.3", sha256="0140a4128c31749c078d9e1dc863cbbd690efc65843c34a4b80f0056e5b8c7b6")
|
||||
version("5.1.0", sha256="d9b9771b885bd94e5d0352290d3fe0fa12f94ce3f384c3844002cd7614880010")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="f249fe700a5a96c6dabf12130a3e366ae6025fe1442a5d11d08801d6c0265af4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="d4ad31db0377096117714c9f4648cb37d6808ce618cd0bb5e4cc89cc9b4e37fd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="e2a128395367a60a17d4d0f62daee7d34358c75332ed582243b18da409589ab8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="54181dd5a132a7f4a34a9316d8c00d78343ec45c069c586134ce4e61e68747f5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="779a3b0afb53277e41cf863185e87f95d9b2bbb748fcb062cbb428d0b510fb69",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="f7a918b513c51dd5eadce3f2e091679b2dfe6544a913960ac483567792a06a4c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="b25e58a842a8eb90bfd6c4ae426ca5cfdd5de2f8a091761f83597f7cfc2cd0f3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="f9618f89384daa0ae897b36638a3737bcfa47e98778e360338267cd1fe2bbc66",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="04743ca8901b94a801759a3c13c8caf3e6ea950ffcda6408173e6f9ef7b86e74",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="9f9a530f7850770663e0b0ec0c786367f2e22500a472ac6652c4fd9fb4df4f64",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="17662028a4485b97e3ccaad5e94d20aaa2c3e9e3f741c7ebbf0f8b4cdebcc555",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="68f1c5102e5cbed205a0ecf5a01efbdccf480f7e484ab1e58cbc6bc03e428122",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="bb42d7fb7ee877b80ce53b0cd1f04b0c8301197b6777d2edddcb44732bf8c9e2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="273e67ecce7e32939341679362b649f3361a36a22fab5f64cefe94b49e6f1e46",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
patch("001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch", when="@4.1.0:4.3.2")
|
||||
patch("002-remove-force-setting-hip-inc-path.patch", when="@4.1.0:4.3.2")
|
||||
patch("003-cmake-change-to-remove-installs-and-sudo.patch", when="@4.1.0:4.3.2")
|
||||
patch("004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch", when="@4.3.0:4.3.2")
|
||||
patch("005-cleanup-path-reference-donot-download-googletest-yaml.patch", when="@4.5.0:5.2")
|
||||
patch("006-library-path.patch", when="@4.5.0:5.2")
|
||||
patch("005-cleanup-path-reference-donot-download-googletest-yaml.patch", when="@:5.2")
|
||||
patch("006-library-path.patch", when="@:5.2")
|
||||
patch(
|
||||
"007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.3.patch",
|
||||
when="@5.3.0:5.5",
|
||||
|
@ -130,28 +56,14 @@ class RocmValidationSuite(CMakePackage):
|
|||
depends_on("cmake@3.5:", type="build")
|
||||
depends_on("zlib-api", type="link")
|
||||
depends_on("yaml-cpp~shared")
|
||||
depends_on("googletest", when="@4.5.0:")
|
||||
depends_on("doxygen", type="build", when="@4.5.0:")
|
||||
depends_on("googletest")
|
||||
depends_on("doxygen", type="build")
|
||||
|
||||
def setup_build_environment(self, build_env):
|
||||
spec = self.spec
|
||||
build_env.set("HIPCC_PATH", spec["hip"].prefix)
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -170,37 +82,23 @@ def setup_build_environment(self, build_env):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, when="@" + ver)
|
||||
depends_on("rocblas@" + ver, when="@" + ver)
|
||||
depends_on("rocm-smi-lib@" + ver, when="@" + ver)
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
]:
|
||||
depends_on("hip-rocclr@" + ver, when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocblas@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}")
|
||||
|
||||
def patch(self):
|
||||
if self.spec.satisfies("@4.5:5.1"):
|
||||
if self.spec.satisfies("@:5.1"):
|
||||
filter_file(
|
||||
"@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True
|
||||
r"@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True
|
||||
)
|
||||
elif self.spec.satisfies("@5.2:5.4"):
|
||||
filter_file(
|
||||
"@ROCM_PATH@/bin", self.spec.prefix.bin, "rvs/conf/deviceid.sh.in", string=True
|
||||
r"@ROCM_PATH@/bin", self.spec.prefix.bin, "rvs/conf/deviceid.sh.in", string=True
|
||||
)
|
||||
elif self.spec.satisfies("@5.5:"):
|
||||
filter_file(
|
||||
"@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True
|
||||
r"@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
|
@ -212,15 +110,14 @@ def cmake_args(self):
|
|||
self.define("ROCBLAS_DIR", self.spec["rocblas"].prefix),
|
||||
self.define("YAML_INC_DIR", self.spec["yaml-cpp"].prefix.include),
|
||||
self.define("YAML_LIB_DIR", self.spec["yaml-cpp"].prefix.lib64),
|
||||
self.define("UT_INC", self.spec["googletest"].prefix.include),
|
||||
]
|
||||
if self.spec.satisfies("@4.5.0:"):
|
||||
args.append(self.define("UT_INC", self.spec["googletest"].prefix.include))
|
||||
libloc = self.spec["googletest"].prefix.lib64
|
||||
if not os.path.isdir(libloc):
|
||||
libloc = self.spec["googletest"].prefix.lib
|
||||
args.append(self.define("UT_LIB", libloc))
|
||||
libloc = self.spec["hsakmt-roct"].prefix.lib64
|
||||
if not os.path.isdir(libloc):
|
||||
libloc = self.spec["hsakmt-roct"].prefix.lib
|
||||
args.append(self.define("HSAKMT_LIB_DIR", libloc))
|
||||
libloc = self.spec["googletest"].prefix.lib64
|
||||
if not os.path.isdir(libloc):
|
||||
libloc = self.spec["googletest"].prefix.lib
|
||||
args.append(self.define("UT_LIB", libloc))
|
||||
libloc = self.spec["hsakmt-roct"].prefix.lib64
|
||||
if not os.path.isdir(libloc):
|
||||
libloc = self.spec["hsakmt-roct"].prefix.lib
|
||||
args.append(self.define("HSAKMT_LIB_DIR", libloc))
|
||||
return args
|
||||
|
|
|
@ -36,94 +36,10 @@ class Rocminfo(CMakePackage):
|
|||
version("5.2.0", sha256="e721eb81efd384abd22ff01cdcbb6245b11084dc11a867c74c8ad6b028aa0404")
|
||||
version("5.1.3", sha256="7aecd7b189e129b77c8f2af70be2926a0f3a5ee89814879bc8477924a7e6f2ae")
|
||||
version("5.1.0", sha256="76f6cc9e69d9fc7e692e5c7db35e89079d3b1d2d47632e4742d612e743c396d3")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="5fd970f08c5d6591efe7379ece564ce5580cba87fb6237531dabbd5adcb6a899",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="43e025de31bffa335d9cb682649add886afdd02c92090ee63e9bf77b3aaaa75b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="5ea839cd1f317cbc72ea1e3634a75f33a458ba0cb5bf48377f08bb329c29222d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="421ed55192780eb478f0341fd1ce47a0dd3ffafbec9d7a02109a411878a58ee5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="d042947d3f29e943a2e3294a2a2d759ca436cebe31151ce048e49bc4f02d6993",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="2cc1f251c0ed9c3ea413cc15cb5ce11559e4497540eebbf5e8dcfd52b03e53d1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="6952b6e28128ab9f93641f5ccb66201339bb4177bb575b135b27b69e2e241996",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="5b994ad02b6d250160770f6f7730835f3a52127193ac9a8dee40c53aec911f4f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="0b3d692959dd4bc2d1665ab3a838592fcd08d2b5e373593b9192ca369e2c4aa7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="ed02375be3be518b83aea7309ef5ca62dc9b6dbad0aae33e92995102d6d660be",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="9592781e0c62b910c4adc5c7f4c27c7a0cddbed13111a19dd91a2ff43720e43d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="c135dc98ecb5f420e22a6efd2f461ba9ed90be3f42e2ac29356e05c6a0706f8f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="86a8e3ce7d91fb2d79688a22a2805757c83922d9f17ea7ea1cb41bf9516197ea",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="1d113f06b7c9b60d0e92b2c12c0c704a565696867496fe7038e5dddd510567b7",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -143,11 +59,11 @@ class Rocminfo(CMakePackage):
|
|||
"6.0.2",
|
||||
"master",
|
||||
]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
def cmake_args(self):
|
||||
return [self.define("ROCM_DIR", self.spec["hsa-rocr-dev"].prefix)]
|
||||
|
|
|
@ -49,11 +49,11 @@ def patch(self):
|
|||
depends_on("pkgconfig", type="build")
|
||||
|
||||
for ver in ["5.3.0", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("rocm-cmake@" + ver, type="build", when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", type="build", when=f"@{ver}")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
|
|
@ -35,76 +35,6 @@ class Rocprim(CMakePackage):
|
|||
version("5.2.0", sha256="f99eb7d2f6b1445742fba631a0dc8bb0d464a767a9c4fb79ac865d9570fe747b")
|
||||
version("5.1.3", sha256="b5a08d2e76388bd1ffa6c946009928fe95de846ab6b65a6475998070c0cf6dc1")
|
||||
version("5.1.0", sha256="dfe106c01155e00ed816f0231d1576ff8c08750cc8278fa453926f388dc6fe48")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="a4280f15d470699a1c6a5f86bdd951c1387e0af227c6bee6f81cee658406f4b0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="0e7e7bda6a09b70a07ddd926986882df0c8d8ff3e0a34e12cb6d44f7d0a5840e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="0dc673847e67db672f2e239f299206fe16c324005ddd2e92c7cb7725bb6f4fa6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="6f0ca1da9a93064af662d6c61fbdb56bb313f8edca85615ead0dd284eb481089",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="d29ffcb5dd1c6155c586b9952fa4c11b717d90073feb083db6b03ea74746194b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="f6cf53b5fa07a0d6f508e39c7da5b11f562c0cac4b041ec5c41a8fc733f707c7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="3932cd3a532eea0d227186febc56747dd95841732734d9c751c656de9dd770c8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="c46d789f85d15f8ec97f90d67b9d49fb87239912fe8d5f60a7b4c59f9d0e3da8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="61abf4d51853ae71e54258f43936bbbb096bf06f5891d224d359bfe3104015d0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="b406956b27d1c06b749e991a250d4ad3eb26e20c6bebf121e2ca6051597b4fa4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="ace6b4ee4b641280807028375cb0e6fa7b296edba9e9fc09177a5d8d075a716e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="4d37320d174eaada99dd796d81fa97d5dcc65a6dff8e8ff1c21e8e68acb4ea74",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="225209a0cbd003c241821c8a9192cec5c07c7f1a6ab7da296305fc69f5f6d365",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="29302dbeb27ae88632aa1be43a721f03e7e597c329602f9ca9c9c530c1def40d",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
||||
|
@ -115,26 +45,11 @@ class Rocprim(CMakePackage):
|
|||
sticky=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.10.2:", type="build", when="@4.2.0:")
|
||||
depends_on("cmake@3.5.1:", type="build")
|
||||
depends_on("numactl", type="link", when="@3.7.0:")
|
||||
depends_on("cmake@3.10.2:", type="build")
|
||||
depends_on("numactl", type="link")
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -153,11 +68,11 @@ class Rocprim(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("comgr@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"comgr@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
|
||||
# the patch is meant for 5.3.0 only.this is already in the 5.3.3+ releases
|
||||
patch("fix-device-merge-mismatched-param-5.3.0.patch", when="@5.3.0")
|
||||
|
@ -179,9 +94,9 @@ def cmake_args(self):
|
|||
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
|
||||
args.append(self.define("__skip_rocmclang", "ON"))
|
||||
|
||||
if self.spec.satisfies("@:5.1.3"):
|
||||
args.append("-DCMAKE_MODULE_PATH={0}".format(self.spec["hip"].prefix.cmake))
|
||||
elif self.spec.satisfies("@5.2.0:"):
|
||||
if self.spec.satisfies("@:5.1"):
|
||||
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
|
||||
elif self.spec.satisfies("@5.2:"):
|
||||
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
|
||||
|
||||
return args
|
||||
|
|
|
@ -29,109 +29,14 @@ class RocprofilerDev(CMakePackage):
|
|||
version("5.2.0", sha256="1f4db27b56ef1863d4c9e1d96bac9117d66be45156d0637cfe4fd38cae61a23a")
|
||||
version("5.1.3", sha256="eca7be451c7bf000fd9c75683e7f5dfbed32dbb385b5ac685d2251ee8c3abc96")
|
||||
version("5.1.0", sha256="4a1c6ed887b0159392406af8796508df2794353a4c3aacc801116044fb4a10a5")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="48f58c3c16dd45fead2086f89a175f74636e81bc2437e30bb6e9361b1083e71d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="2ed521f400e4aafd17405c2f9ad2fb3b906a982d3767b233122d9c2964c3245f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="baa59826f8fb984993c03d05e2e3cdf0b830b08f8056b18ba206dfbaa367aca9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="9b47b086d28fc831dbe0f83ec7e4640057b97edc961f2f050a0968633f32a06b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="c6f5fa192c9cdb32553d24ed5c847107d312042e39fa3dd17c83e237c9542a2d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="3b876a0e601d2c6ae56ddf2a6027afe45b3533f4445b0c2da748d020b6b00cf2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="c5888eda1404010f88219055778cfeb00d9c21901e172709708720008b1af80f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="2eead5707016da606d636b97f3af1c98cb471da78659067d5a77d4a2aa43ef4c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="e9960940d1ec925814a0e55ee31f5fc2fb23fa839d1c6a909f72dd83f657fb25",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="fbf5ce9fbc13ba2b3f9489838e00b54885aba92336f055e8b03fef3e3347071e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="f07ddd9bf2f86550c8d243f887e9bde9d4f2ceec81ecc6393012aaf2a45999e8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="38ad3ac20f60f3290ce750c34f0aad442354b1d0a56b81167a018e44ecdf7fff",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="d3f03bf850cbd86ca9dfe6e6cc6f559d8083b0f3ea4711d8260b232cb6fdd1cc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="c42548dd467b7138be94ad68c715254eb56a9d3b670ccf993c43cd4d43659937",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
"5.2.1",
|
||||
"5.2.3",
|
||||
"5.3.0",
|
||||
"5.3.3",
|
||||
"5.4.0",
|
||||
"5.4.3",
|
||||
]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, when="@" + ver)
|
||||
depends_on("roctracer-dev-api@" + ver, when="@" + ver)
|
||||
for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3", "5.4.0", "5.4.3"]:
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", when=f"@{ver}")
|
||||
depends_on(f"roctracer-dev-api@{ver}", when=f"@{ver}")
|
||||
|
||||
depends_on("numactl", type="link", when="@4.3.1")
|
||||
# See https://github.com/ROCm/rocprofiler/pull/50
|
||||
patch("fix-includes.patch")
|
||||
patch("0001-Continue-build-in-absence-of-aql-profile-lib.patch", when="@5.3:")
|
||||
|
@ -149,12 +54,10 @@ def patch(self):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
return [
|
||||
|
|
|
@ -44,76 +44,6 @@ class Rocrand(CMakePackage):
|
|||
version("5.2.0", sha256="ab3057e7c17a9fbe584f89ef98ec92a74d638a98d333e7d0f64daf7bc9051e38")
|
||||
version("5.1.3", sha256="4a19e1bcb60955a02a73ad64594c23886d6749afe06b0104e2b877dbe02c8d1c")
|
||||
version("5.1.0", sha256="0c6f114a775d0b38be71f3f621a10bde2104a1f655d5d68c5fecb79b8b51a815")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="2dbce2a7fb273c2f9456c002adf3a510b9ec79f2ff32dfccdd59948f3ddb1505",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="356a03a74d6d5df3ae2d38da07929f23d90bb4dee71f88792c25c25069e673bc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="1523997a21437c3b74d47a319d81f8cc44b8e96ec5174004944f2fb4629900db",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="fd391f81b9ea0b57808d93e8b72d86eec1b4c3529180dfb99ed6d3e2aa1285c2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="b3d6ae0cdbbdfb56a73035690f8cb9e173fec1ccaaf9a4c5fdbe5e562e50c901",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="a85ced6c155befb7df8d58365518f4d9afc4407ee4e01d4640b5fd94604ca3e0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="15725c89e9cc9cc76bd30415fd2c0c5b354078831394ab8b23fe6633497b92c8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="94327e38739030ab6719a257f5a928a35842694750c7f46d9e11ff2164c2baed",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="1cafdbfa15cde635bd424d2a858dc5cc94d668f9a211ff39606ee01ed1715f41",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="f55e2b49b4dfd887e46eea049f3359ae03c60bae366ffc979667d364205bc99c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="a500a3a83be36b6c91aa062dc6eef1f9fc1d9ee62422d541cc279513d98efa91",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="79eb84d41363a46ed9bb18d9757cf6a419d2f48bb6a71b8e4db616a5007a6560",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="5e43fe07afe2c7327a692b3b580875bae6e6ee790e044c053fffafbfcbc14860",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="592865a45e7ef55ad9d7eddc8082df69eacfd2c1f3e9c57810eb336b15cd5732",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
||||
|
@ -125,8 +55,7 @@ class Rocrand(CMakePackage):
|
|||
)
|
||||
variant("hiprand", default=True, when="@5.1.0:", description="Build the hiprand library")
|
||||
|
||||
depends_on("cmake@3.10.2:", type="build", when="@4.5.0:")
|
||||
depends_on("cmake@3.5.1:", type="build")
|
||||
depends_on("cmake@3.10.2:", type="build")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
|
||||
|
@ -156,7 +85,7 @@ class Rocrand(CMakePackage):
|
|||
commit=d_commit,
|
||||
destination="",
|
||||
placement="hiprand",
|
||||
when="@{0} +hiprand".format(d_version),
|
||||
when=f"@{d_version} +hiprand",
|
||||
)
|
||||
resource(
|
||||
name="hipRAND",
|
||||
|
@ -176,20 +105,6 @@ class Rocrand(CMakePackage):
|
|||
)
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -208,8 +123,8 @@ class Rocrand(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
|
||||
def patch(self):
|
||||
if self.spec.satisfies("@5.1.0:5.4 +hiprand"):
|
||||
|
@ -227,38 +142,7 @@ def fix_library_locations(self):
|
|||
# rocRAND installs librocrand.so* and libhiprand.so* to rocrand/lib and
|
||||
# hiprand/lib, respectively. This confuses spack's RPATH management. We
|
||||
# fix it by adding a symlink to the libraries.
|
||||
if self.spec.satisfies("@:5.0.2"):
|
||||
hiprand_lib_path = join_path(self.prefix, "hiprand", "lib")
|
||||
rocrand_lib_path = join_path(self.prefix, "rocrand", "lib")
|
||||
mkdirp(self.prefix.lib)
|
||||
with working_dir(hiprand_lib_path):
|
||||
hiprand_libs = glob.glob("*.so*")
|
||||
for lib in hiprand_libs:
|
||||
os.symlink(join_path(hiprand_lib_path, lib), join_path(self.prefix.lib, lib))
|
||||
with working_dir(rocrand_lib_path):
|
||||
rocrand_libs = glob.glob("*.so*")
|
||||
for lib in rocrand_libs:
|
||||
os.symlink(join_path(rocrand_lib_path, lib), join_path(self.prefix.lib, lib))
|
||||
"""Fix the rocRAND and hipRAND include path"""
|
||||
# rocRAND installs rocrand*.h* and hiprand*.h* rocrand/include and
|
||||
# hiprand/include, respectively. This confuses spack's RPATH management. We
|
||||
# fix it by adding a symlink to the header files.
|
||||
hiprand_include_path = join_path(self.prefix, "hiprand", "include")
|
||||
rocrand_include_path = join_path(self.prefix, "rocrand", "include")
|
||||
|
||||
with working_dir(hiprand_include_path):
|
||||
hiprand_includes = glob.glob("*.h*")
|
||||
hiprand_path = join_path(self.prefix, "hiprand")
|
||||
with working_dir(hiprand_path):
|
||||
for header_file in hiprand_includes:
|
||||
os.symlink(join_path("include", header_file), header_file)
|
||||
with working_dir(rocrand_include_path):
|
||||
rocrand_includes = glob.glob("*.h*")
|
||||
rocrand_path = join_path(self.prefix, "rocrand")
|
||||
with working_dir(rocrand_path):
|
||||
for header_file in rocrand_includes:
|
||||
os.symlink(join_path("include", header_file), header_file)
|
||||
elif self.spec.satisfies("@5.1.0:5.1.3"):
|
||||
if self.spec.satisfies("@5.1.0:5.1.3"):
|
||||
if not os.path.isdir(os.path.join(self.prefix, "hiprand")):
|
||||
os.mkdir(os.path.join(self.prefix, "hiprand"))
|
||||
os.mkdir(os.path.join(self.prefix, "hiprand", "include"))
|
||||
|
@ -274,12 +158,10 @@ def fix_library_locations(self):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
args = [self.define("BUILD_BENCHMARK", "OFF"), self.define("BUILD_TEST", self.run_tests)]
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
diff -r -u a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
|
||||
--- a/clients/benchmarks/CMakeLists.txt 2021-08-14 18:54:53.356456513 -0600
|
||||
+++ b/clients/benchmarks/CMakeLists.txt 2021-08-14 18:55:25.125354419 -0600
|
||||
@@ -19,6 +19,7 @@
|
||||
target_link_libraries( rocsolver-bench PRIVATE
|
||||
cblas
|
||||
lapack
|
||||
+ blas
|
||||
Threads::Threads
|
||||
hip::device
|
||||
rocsolver-common
|
||||
diff -r -u a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
|
||||
--- a/clients/gtest/CMakeLists.txt 2021-08-14 18:54:53.356456513 -0600
|
||||
+++ b/clients/gtest/CMakeLists.txt 2021-08-14 18:55:16.581112850 -0600
|
||||
@@ -89,6 +89,7 @@
|
||||
target_link_libraries( rocsolver-test PRIVATE
|
||||
cblas
|
||||
lapack
|
||||
+ blas
|
||||
GTest::GTest
|
||||
hip::device
|
||||
rocsolver-common
|
|
@ -59,115 +59,30 @@ class Rocsolver(CMakePackage):
|
|||
version("5.2.0", sha256="94d46ebe1266eaa05df50c1789dc27d3f2dbf3cb5af156e757777a82ed6ef356")
|
||||
version("5.1.3", sha256="5a8f3b95ac9a131c31538196e954ea53b863009c092cce0c0ef869a0cd5dd554")
|
||||
version("5.1.0", sha256="88de515a6e75eaa3c50c9c8ae1e7ae8e3b46e712e388f44f79b63fefa9fc0831")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="298e0903f1ba8074055ab072690f967062d6e06a9371574de23e4e38d2997688",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="d444ad5348eb8a2c04646ceae6923467a0e775441f2c73150892e228e585b2e1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="4639322bd1e77fedfdeb9032633bde6211a0b1cc16a612db7754f873f18a492f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="0295862da941f31f4d43b19195b79331bd17f5968032f75c89d2791a6f8c1e8c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="c6e7468d7041718ce6e1c7f50ec80a552439ac9cfed2dc3f753ae417dda5724f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="63cc88dd285c0fe01ec2394321ec3b4e1e59bb98ce05b06e4b4d8fadcf1ff028",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="e9ef72d7c29e7c36bf02be63a64ca23b444e1ca71751749f7d66647873d9fdea",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="da5cc800dabf7367b02b73c93780b2967f112bb45232e4b06e5fd07b4d5b8d88",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="be9a52644c276813f76d78f2c11eddaf8c2d7f9dd04f4570f23d328ad30d5880",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="bc72483656b6b23a1e321913a580ca460da3bc5976404647536a01857f178dd2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="85fd77fe5acf5af518d11e90e2c03ee0c5abd61071cea86ef5df09f944879648",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="72aa74284944d8b454088e8c8d74cf05464a4e2e46d33a57017ddd009113025e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="8c1c630595952806e658c539fd0f3056bd45bafc22b57f0dd10141abefbe4595",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="d655e8c762fb9e123b9fd7200b4258512ceef69973de4d0588c815bc666cb358",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.8:", type="build", when="@4.1.0:")
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
depends_on("fmt@7:", type="build", when="@4.5.0:")
|
||||
depends_on("fmt@7:8.0.1", type="test", when="@5.6:")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
depends_on("netlib-lapack@3.7.1:", type="test")
|
||||
|
||||
patch("link-clients-blas.patch", when="@4.3.0:4.3.2")
|
||||
# Backport https://github.com/ROCm/rocSOLVER/commit/2bbfb8976f6e4d667499c77e41a6433850063e88
|
||||
patch("fmt-8.1-compatibility.patch", when="@4.5.0:5.1.3")
|
||||
patch("fmt-8.1-compatibility.patch", when="@:5.1.3")
|
||||
# Maximize compatibility with other libraries that are using fmt.
|
||||
patch("fmt-9-compatibility.patch", when="@5.2.0:5.5")
|
||||
|
||||
depends_on("hip@4.1.0:", when="@4.1.0:")
|
||||
depends_on("hip")
|
||||
depends_on("rocm-cmake@master", type="build", when="@master:")
|
||||
depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:")
|
||||
depends_on("rocm-cmake@4.3.0:", type="build", when="@4.3.0:")
|
||||
depends_on("rocm-cmake@3.5.0:", type="build")
|
||||
depends_on("rocsparse@5.2:", when="@5.6:")
|
||||
|
||||
for ver in ["master", "develop"]:
|
||||
depends_on("rocblas@" + ver, when="@" + ver)
|
||||
depends_on(f"rocblas@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -186,55 +101,37 @@ class Rocsolver(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocblas@" + ver, when="@" + ver)
|
||||
for ver in ["5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocsparse@5.2:", when="@5.6:")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocblas@{ver}", when=f"@{ver}")
|
||||
|
||||
for tgt in itertools.chain(["auto"], amdgpu_targets):
|
||||
depends_on("rocblas amdgpu_target={0}".format(tgt), when="amdgpu_target={0}".format(tgt))
|
||||
depends_on(f"rocblas amdgpu_target={tgt}", when=f"amdgpu_target={tgt}")
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
|
||||
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
|
||||
self.define("BUILD_CLIENTS_BENCHMARKS", "OFF"),
|
||||
self.define_from_variant("OPTIMAL", "optimal"),
|
||||
self.define("ROCSOLVER_EMBED_FMT", "ON"),
|
||||
]
|
||||
if self.spec.satisfies("@4.1.0"):
|
||||
incl = self.spec["rocblas"].prefix
|
||||
args.append(self.define("CMAKE_CXX_FLAGS", "-I{0}/rocblas/include".format(incl)))
|
||||
|
||||
if self.spec.satisfies("@3.7.0:"):
|
||||
args.append(self.define_from_variant("OPTIMAL", "optimal"))
|
||||
|
||||
tgt = self.spec.variants["amdgpu_target"]
|
||||
if "auto" not in tgt:
|
||||
if "@:3.8.0" in self.spec:
|
||||
args.append(
|
||||
self.define(
|
||||
"CMAKE_CXX_FLAGS", "--amdgpu-target={0}".format(",".join(tgt.value))
|
||||
)
|
||||
)
|
||||
else:
|
||||
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
||||
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
||||
|
||||
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
|
||||
args.append(self.define("__skip_rocmclang", "ON"))
|
||||
|
||||
if self.spec.satisfies("@4.5.0:"):
|
||||
args.append(self.define("ROCSOLVER_EMBED_FMT", "ON"))
|
||||
|
||||
if self.spec.satisfies("@5.2.0:"):
|
||||
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
|
||||
if self.spec.satisfies("@5.3.0:"):
|
||||
|
|
|
@ -52,94 +52,10 @@ class Rocsparse(CMakePackage):
|
|||
version("5.2.0", sha256="7ed929af16d2502135024a6463997d9a95f03899b8a33aa95db7029575c89572")
|
||||
version("5.1.3", sha256="ef9641045b36c9aacc87e4fe7717b41b1e29d97e21432678dce7aca633a8edc2")
|
||||
version("5.1.0", sha256="a2f0f8cb02b95993480bd7264fc65e8b11464a90b86f2dcd0dd82a2e6d4bd704")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="c9d9e1b7859e1c5aa5050f5dfdf86245cbd7c1296c0ce60d9ca5f3e22a9b748b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="6d352bf27dbed08e5115a58815aa76c59eb2008ec9dcc921aadf2efe20115d2a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="e37af2cd097e239a55a278df534183b5591ef4d985fe1a268a229bd11ada6599",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="b120e9e17e7e141caee4c8c4288c9d1902bad0cec2ea76458d3ba11343376938",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="fa5ea64f71e1cfbebe41618cc183f501b387824a6dc58486ab1214d7af5cbef2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="1a8109bdc8863b3acfe991449360c9361cae7cabdbe753c553bc57872cd0ad5e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="8a86ed49d278e234c82e406a1430dc28f50d416f8f1065cf5bdf25cc5721129c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="7514968ed2342dc274acce8b269c128a6aa96cce769a37fd3880b5269c2ed17f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="2b41bc6623d204ad7f351a902810f34cd32b762d1bf59081dbb00f83e689a794",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="8325828c5d7818dfb45e03b5f1572a573cc21964d596aaaa33b7469817b03abd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="7b8f952d0c7f8ac2f3bb60879ab420fabbfafb0885a3d8464d5b4c191e97dec6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="a5d085fffe05a7ac7f5658075d9782b9b02d0c5c3e2c1807dad266c3a61141fd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="db561ae5e8ee117f7c539a9ef6ee49c13b82ba9f702b22c76e741cca245386a9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="9ca6bae7da78abbb47143c3d77ff4a8cd7d63979875fc7ebc46b400769fd9cb5",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.5:", type="build")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -158,16 +74,16 @@ class Rocsparse(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocprim@" + ver, when="@" + ver)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocprim@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
|
||||
# Add option so Spack can manage downloaded test matricies as resources.
|
||||
patch("0001-set-mtx-directory.patch", when="@4.5.0:5.3 +test")
|
||||
patch("0001-set-mtx-directory.patch", when="@:5.3 +test")
|
||||
# Enable use of Spack-provided Python.
|
||||
patch("0002-fix-gentest-shebang.patch", when="@4.5.0:5.3 +test")
|
||||
patch("0002-fix-gentest-shebang.patch", when="@:5.3 +test")
|
||||
# Fix build for most Radeon 5000 and Radeon 6000 series GPUs.
|
||||
patch("0003-fix-navi-1x-rocm-4.5.patch", when="@4.5.0:5.1")
|
||||
patch("0003-fix-navi-1x-rocm-4.5.patch", when="@:5.1")
|
||||
patch("0003-fix-navi-1x-rocm-5.2.patch", when="@5.2")
|
||||
|
||||
depends_on("googletest@1.11.0:", when="@5.1.0: +test")
|
||||
|
@ -336,12 +252,10 @@ def setup_build_environment(self, env):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
|
|
|
@ -36,76 +36,6 @@ class Rocthrust(CMakePackage):
|
|||
version("5.2.0", sha256="afa126218485586682c78e97df8025ae4efd32f3751c340e84c436e08868c326")
|
||||
version("5.1.3", sha256="8d92de1e69815d92a423b7657f2f37c90f1d427f5bc92915c202d4c266254dad")
|
||||
version("5.1.0", sha256="fee779ae3d55b97327d87beca784fc090fa02bc95238d9c3bf3021e266e73979")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="60f0cf1848cc7cd8663f15307bd695eee3c5b20d3ad3baa4bc696189ffdcfd53",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="10b7b1be919881904d64f8084c2afe22aa00c560f8493a75dbf5df8386443ab4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="9171a05dd7438aebd4f6a939b1b33b7e87be1a0bd52d90a171b74539885cf591",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="86cf897b01a6f5df668d978ce42d44a6ae9df9f8adc92d0a1a49a7c3bbead259",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="86fcd3bc275efe9a485aed48afdc6d3351804c076caee43e3fb8bd69752865e9",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="a50eb6500687b4ea9e0b3affb1daff8bbc56199d39fbed3ee61d2d5bfc1a0271",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="da2b6c831c26c26058218b0c5b7b2e43fd7f0dac3b2e3a8e39a839145592c727",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="e3d06c0387a2a6880776c7423b1acf0808fb8833bc822be75793da8c2f521efd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="120c87316f44ce8e8975e57c9b9bf1246b1ffc00879d31d744289ba9438a976c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="31bea6cd19a0ffa15e4ab50ecde2402ea5aaa182149cfab98242357e41f1805b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="65f5e74d72c5aaee90459468d693b212af7d56e31098ee8237b18d1b4d620eb0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="39350aeb8bfbcd09e387717b2a05c7e3a19e0fa85ff4284b967bb8fae12f9013",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="4cb923dde5eec150a566cb10d23ee5c7ce3aa892c4dea94886a89d95b90f3bdd",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="0d1bac1129d17bb1259fd06f5c9cb4c1620d1790b5c295b866fb3442d18923cb",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
amdgpu_targets = ROCmPackage.amdgpu_targets
|
||||
|
||||
|
@ -117,26 +47,11 @@ class Rocthrust(CMakePackage):
|
|||
values=auto_or_any_combination_of(*amdgpu_targets),
|
||||
sticky=True,
|
||||
)
|
||||
depends_on("cmake@3.10.2:", type="build", when="@4.2.0:")
|
||||
depends_on("cmake@3.5.1:", type="build")
|
||||
depends_on("cmake@3.10.2:", type="build")
|
||||
|
||||
depends_on("googletest@1.10.0:", type="test")
|
||||
|
||||
for ver in [
|
||||
"3.5.0",
|
||||
"3.7.0",
|
||||
"3.8.0",
|
||||
"3.9.0",
|
||||
"3.10.0",
|
||||
"4.0.0",
|
||||
"4.1.0",
|
||||
"4.2.0",
|
||||
"4.3.0",
|
||||
"4.3.1",
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -155,9 +70,9 @@ class Rocthrust(CMakePackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
depends_on("rocprim@" + ver, when="@" + ver)
|
||||
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocprim@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("CXX", self.spec["hip"].hipcc)
|
||||
|
|
|
@ -37,76 +37,6 @@ class RoctracerDevApi(Package):
|
|||
version("5.2.0", sha256="9747356ce61c57d22c2e0a6c90b66a055e435d235ba3459dc3e3f62aabae6a03")
|
||||
version("5.1.3", sha256="45f19875c15eb609b993788b47fd9c773b4216074749d7744f3a671be17ef33c")
|
||||
version("5.1.0", sha256="58b535f5d6772258190e4adcc23f37c916f775057a91b960e1f2ee1f40ed5aac")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="5ee46f079e57dfe491678ffa4cdaf5f3b3d179cb3137948e4bcafca99ded47cc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="a21f4fb093cee4a806d53cbc0645d615d89db12fbde305e9eceee7e4150acdf2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="7012d18b79736dbe119161aab86f4976b78553ce0b2f4753a9386752d75d5074",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="83dcd8987e129b14da0fe74e24ce8d027333f8fedc9247a402d3683765983296",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.1",
|
||||
sha256="88ada5f256a570792d1326a305663e94cf2c3b0cbd99f7e745326923882dafd2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.3.0",
|
||||
sha256="c3d9f408df8d4dc0e9c0026217b8c684f68e775da80b215fecb3cd24419ee6d3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.2.0",
|
||||
sha256="62a9c0cb1ba50b1c39a0636c886ac86e75a1a71cbf5fec05801517ceb0e67a37",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.1.0",
|
||||
sha256="5d93de4e92895b6eb5f9d098f5dbd182d33923bd9b2ab69cf5a1abbf91d70695",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.0.0",
|
||||
sha256="f47859a46173228b597c463eda850b870e810534af5efd5f2a746067ef04edee",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.10.0",
|
||||
sha256="ac4a1d059fc34377e906071fd0e56f5434a7e0e4ded9db8faf9217a115239dec",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.9.0",
|
||||
sha256="0678f9faf45058b16923948c66d77ba2c072283c975d167899caef969169b292",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.8.0",
|
||||
sha256="5154a84ce7568cd5dba756e9508c34ae9fc62f4b0b5731f93c2ad68b21537ed1",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.7.0",
|
||||
sha256="6fa5b771e990f09c242237ab334b9f01039ec7d54ccde993e719c5d6577d1518",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"3.5.0",
|
||||
sha256="7af5326c9ca695642b4265232ec12864a61fd6b6056aa7c4ecd9e19c817f209e",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
source_directory = self.stage.source_path
|
||||
|
|
|
@ -40,36 +40,12 @@ class RoctracerDev(CMakePackage, ROCmPackage):
|
|||
version("5.2.0", sha256="9747356ce61c57d22c2e0a6c90b66a055e435d235ba3459dc3e3f62aabae6a03")
|
||||
version("5.1.3", sha256="45f19875c15eb609b993788b47fd9c773b4216074749d7744f3a671be17ef33c")
|
||||
version("5.1.0", sha256="58b535f5d6772258190e4adcc23f37c916f775057a91b960e1f2ee1f40ed5aac")
|
||||
version(
|
||||
"5.0.2",
|
||||
sha256="5ee46f079e57dfe491678ffa4cdaf5f3b3d179cb3137948e4bcafca99ded47cc",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"5.0.0",
|
||||
sha256="a21f4fb093cee4a806d53cbc0645d615d89db12fbde305e9eceee7e4150acdf2",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.2",
|
||||
sha256="7012d18b79736dbe119161aab86f4976b78553ce0b2f4753a9386752d75d5074",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"4.5.0",
|
||||
sha256="83dcd8987e129b14da0fe74e24ce8d027333f8fedc9247a402d3683765983296",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cmake@3:", type="build")
|
||||
depends_on("python@3:", type="build")
|
||||
depends_on("py-cppheaderparser", type="build")
|
||||
|
||||
for ver in [
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
|
@ -88,29 +64,15 @@ class RoctracerDev(CMakePackage, ROCmPackage):
|
|||
"6.0.0",
|
||||
"6.0.2",
|
||||
]:
|
||||
depends_on("hsakmt-roct@" + ver, when="@" + ver)
|
||||
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
|
||||
depends_on("rocminfo@" + ver, when="@" + ver)
|
||||
depends_on("hip@" + ver, when="@" + ver)
|
||||
for ver in [
|
||||
"4.5.0",
|
||||
"4.5.2",
|
||||
"5.0.0",
|
||||
"5.0.2",
|
||||
"5.1.0",
|
||||
"5.1.3",
|
||||
"5.2.0",
|
||||
"5.2.1",
|
||||
"5.2.3",
|
||||
"5.3.0",
|
||||
"5.3.3",
|
||||
"5.4.0",
|
||||
"5.4.3",
|
||||
]:
|
||||
depends_on("rocprofiler-dev@" + ver, when="@" + ver)
|
||||
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
|
||||
depends_on(f"rocminfo@{ver}", when=f"@{ver}")
|
||||
depends_on(f"hip@{ver}", when=f"@{ver}")
|
||||
for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3", "5.4.0", "5.4.3"]:
|
||||
depends_on(f"rocprofiler-dev@{ver}", when=f"@{ver}")
|
||||
|
||||
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
|
||||
depends_on("rocm-core@" + ver, when="@" + ver)
|
||||
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
|
||||
|
||||
patch("0001-include-rocprofiler-dev-path.patch", when="@5.3:5.4")
|
||||
|
||||
|
@ -118,35 +80,34 @@ class RoctracerDev(CMakePackage, ROCmPackage):
|
|||
def determine_version(cls, lib):
|
||||
match = re.search(r"rocm-(\d+)\.(\d+)\.(\d)/lib/lib\S*\.so\.\d+\.\d+\.\d+", lib)
|
||||
if match:
|
||||
ver = "{0}.{1}.{2}".format(
|
||||
return "{0}.{1}.{2}".format(
|
||||
int(match.group(1)), int(match.group(2)), int(match.group(3))
|
||||
)
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
return None
|
||||
|
||||
def patch(self):
|
||||
filter_file(
|
||||
"${CMAKE_PREFIX_PATH}/hsa",
|
||||
r"${CMAKE_PREFIX_PATH}/hsa",
|
||||
"${HSA_RUNTIME_INC_PATH}",
|
||||
"src/CMakeLists.txt",
|
||||
string=True,
|
||||
)
|
||||
kwargs = {"ignore_absent": False, "backup": False, "string": False}
|
||||
with working_dir("script"):
|
||||
match = "^#!/usr/bin/python[23]"
|
||||
python = self.spec["python"].command.path
|
||||
substitute = "#!{python}".format(python=python)
|
||||
files = ["check_trace.py", "gen_ostream_ops.py", "hsaap.py"]
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
filter_file(
|
||||
"^#!/usr/bin/python[23]",
|
||||
f"#!{self.spec['python'].command.path}",
|
||||
"check_trace.py",
|
||||
"gen_ostream_ops.py",
|
||||
"hsaap.py",
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
"-DHIP_VDI=1",
|
||||
"-DCMAKE_MODULE_PATH={0}/cmake_modules".format(self.stage.source_path),
|
||||
"-DHSA_RUNTIME_HSA_INC_PATH={0}/include".format(self.spec["hsa-rocr-dev"].prefix),
|
||||
"-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON",
|
||||
self.define("HIP_VDI", "1"),
|
||||
self.define("CMAKE_MODULE_PATH", f"{self.stage.source_path}/cmake_modules"),
|
||||
self.define("HSA_RUNTIME_HSA_INC_PATH", self.spec["hsa-rocr-dev"].prefix.include),
|
||||
self.define("CMAKE_POSITION_INDEPENDENT_CODE", True),
|
||||
]
|
||||
if self.spec.satisfies("@:5.4.0"):
|
||||
"-DROCPROFILER_PATH={0}".format(self.spec["rocprofiler-dev"].prefix)
|
||||
args.append(self.define("ROCPROFILER_PATH", self.spec["rocprofiler-dev"].prefix))
|
||||
return args
|
||||
|
|
|
@ -165,9 +165,6 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
|
|||
depends_on("rocblas", when="+rocm")
|
||||
depends_on("rocsolver", when="@7.5.0: +rocm")
|
||||
|
||||
# FindHIP cmake script only works for < 4.1
|
||||
depends_on("hip@:4.0", when="@:7.2.0 +rocm")
|
||||
|
||||
conflicts("^libxc@5.0.0") # known to produce incorrect results
|
||||
conflicts("+single_precision", when="@:7.2.4")
|
||||
conflicts("+scalapack", when="^cray-libsci")
|
||||
|
|
|
@ -53,14 +53,12 @@ class Spfft(CMakePackage, CudaPackage, ROCmPackage):
|
|||
|
||||
depends_on("cuda@:10", when="@:0.9.11 +cuda")
|
||||
|
||||
# Workaround for compiler bug in ROCm 4.5+ added in SpFFT 1.0.6
|
||||
conflicts("+rocm", when="@:1.0.5")
|
||||
|
||||
with when("+rocm"):
|
||||
# FindHIP cmake script only works for < 4.1
|
||||
depends_on("hip@:4.0", when="@:1.0.1")
|
||||
# Workaround for compiler bug in ROCm 4.5 added in SpFFT 1.0.6
|
||||
depends_on("hip@:4.3.1", when="@:1.0.5")
|
||||
depends_on("rocfft")
|
||||
# rocFFT and hipFFT have split with latest versions
|
||||
depends_on("hipfft", when="^rocfft@4.1.0:")
|
||||
depends_on("hipfft")
|
||||
|
||||
# Fix compilation error in some cases due to missing include statement
|
||||
# before version 1.0.3
|
||||
|
|
Loading…
Reference in a new issue