
* bump up the version for ROCm-6.4.0 * update rocm-openmp-extras * fix for rocprofiler-sdk * fix hipblaslt ci fail * bump hipsparselt * set clang to use llvm-amdgpu * modify rom-smi-lib and update hip-tensor * miopen-hip: replace patch with commit * miopen-hip: remove patch * fix rocdecode libdrm error * rocjpeg fix libdrm error * rocm-bandwidth-test and amdsmi: add c dependency * add explicit roctracer-dev dependency * fix issue with rocm-openmp-extras using external * add c dependency to rocm-debug-agent and rocm-dbgapi * rocm-debug-agent: set clang as compiler * hip-tensor: add c dependency * hipsparselt: modify patch * hipsparselt: fix ROCM_SMI_PATH * hipsparselt: add c dependency * rocm-validation-suite: add patch for libdrm * rdc: remove rocm-smi-lib dependency * rocmwmma: replace patch * rocmwmma: remove old patch * rocwmma: modify patch * add c dependencies * add c dependency to rocwmma and rocm-examples * rocAL: force use of spack python * rdc: add c dependency * roctracer-dev: use llvm-amdgpu clang++ * rocm-tensile: add patch * rocm-cmake: fix standalone test * rocblas: fix client test error * roctracer-dev: fix ci fail * hipblaslt: add patch for client test * hipfort: add c dependency * py-tensorflow restrict to rocm 6.3
132 lines
5.9 KiB
Python
132 lines
5.9 KiB
Python
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
|
#
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
|
from spack_repo.builtin.build_systems.cmake import CMakePackage
|
|
from spack_repo.builtin.build_systems.rocm import ROCmPackage
|
|
|
|
from spack.package import *
|
|
|
|
|
|
class Hipsparselt(CMakePackage, ROCmPackage):
|
|
"""hipSPARSELt is a SPARSE marshalling library, with multiple supported backends.
|
|
It sits between the application and a 'worker' SPARSE library, marshalling inputs into
|
|
the backend library and marshalling results back to the application. hipSPARSELt exports
|
|
an interface that does not require the client to change, regardless of the chosen backend.
|
|
Currently, hipSPARSELt supports rocSPARSELt and cuSPARSELt v0.4 as backends."""
|
|
|
|
homepage = "https://github.com/ROCm/hipsparselt"
|
|
url = "https://github.com/ROCm/hipSPARSELt/archive/refs/tags/rocm-6.1.2.tar.gz"
|
|
git = "https://github.com/ROCm/hipsparseLt.git"
|
|
|
|
maintainers("srekolam", "afzpatel", "renjithravindrankannath")
|
|
|
|
license("MIT")
|
|
version("6.4.0", sha256="3950f424c5623bdf764e23c263f3a63de62e3690f491251b88054e27560dc604")
|
|
version("6.3.3", sha256="6b756e20fddb37b8c1237ef8e124452c9bdd46acad8a40699d10b609d0d2ebfc")
|
|
version("6.3.2", sha256="a0b30b478eff822dd7fa1c116ad99dcdf14ece1c33aae04ac71b594efd4d9866")
|
|
version("6.3.1", sha256="403d4c0ef47f89510452a20be6cce72962f21761081fc19a7e0e27e7f0c4ccfd")
|
|
version("6.3.0", sha256="f67ed4900101686596add37824d0628f1e71cf6a30d827a0519b3c3657f63ac3")
|
|
version("6.2.4", sha256="7b007b346f89fac9214ad8541b3276105ce1cac14d6f95a8a504b5a5381c8184")
|
|
version("6.2.1", sha256="a23287bc759442aebaccce0306f5e3938865240e13553847356c25c54214a0d4")
|
|
version("6.2.0", sha256="a25a3ce0ed3cc616b1a4e38bfdd5e68463bb9fe791a56d1367b8a6373bb63d12")
|
|
version("6.1.2", sha256="a5a01fec7bc6e1f4792ccd5c8eaee7b42deac315c54298a7ce5265e5551e8640")
|
|
version("6.1.1", sha256="ca6da099d9e385ffce2b68404f395a93b199af1592037cf52c620f9148a6a78d")
|
|
version("6.1.0", sha256="66ade6de4fd19d144cab27214352faf5b00bbe12afe59472efb441b16d090265")
|
|
version("6.0.2", sha256="bdbceeae515f737131f0391ee3b7d2f7b655e3cf446e4303d93f083c59053587")
|
|
version("6.0.0", sha256="cc4c7970601edbaa7f630b7ea24ae85beaeae466ef3e5ba63e11eab52465c157")
|
|
|
|
amdgpu_targets = ROCmPackage.amdgpu_targets
|
|
variant(
|
|
"amdgpu_target",
|
|
description="AMD GPU architecture",
|
|
values=disjoint_sets(("auto",), amdgpu_targets)
|
|
.with_default("auto")
|
|
.with_error(
|
|
"the values 'auto' and 'none' are mutually exclusive with any of the other values"
|
|
)
|
|
.with_non_feature_values("auto", "none"),
|
|
sticky=True,
|
|
)
|
|
variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
|
|
|
|
depends_on("c", type="build")
|
|
depends_on("cxx", type="build") # generated
|
|
|
|
for ver in [
|
|
"6.0.0",
|
|
"6.0.2",
|
|
"6.1.0",
|
|
"6.1.1",
|
|
"6.1.2",
|
|
"6.2.0",
|
|
"6.2.1",
|
|
"6.2.4",
|
|
"6.3.0",
|
|
"6.3.1",
|
|
"6.3.2",
|
|
"6.3.3",
|
|
"6.4.0",
|
|
]:
|
|
depends_on(f"hip@{ver}", when=f"@{ver}")
|
|
depends_on(f"hipsparse@{ver}", when=f"@{ver}")
|
|
depends_on(f"rocm-openmp-extras@{ver}", when=f"@{ver}", type="test")
|
|
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
|
|
|
|
for ver in ["6.3.0", "6.3.1", "6.3.2", "6.3.3", "6.4.0"]:
|
|
depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}")
|
|
|
|
depends_on("cmake@3.5:", type="build")
|
|
depends_on("msgpack-c@3:")
|
|
depends_on("python@3.6:")
|
|
depends_on("py-virtualenv")
|
|
depends_on("py-wheel")
|
|
depends_on("py-pip")
|
|
depends_on("py-pyyaml", type="test")
|
|
depends_on("py-joblib")
|
|
depends_on("googletest@1.10.0:", type="test")
|
|
depends_on("netlib-lapack@3.7.1:", type="test")
|
|
|
|
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack.patch", when="@6.0")
|
|
# Below patch sets the proper path for clang++,lld and clang-offload-blunder inside the
|
|
# tensorlite subdir of hipblas . Also adds hipsparse and msgpack include directories
|
|
# for 6.1.0 release.
|
|
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.1.patch", when="@6.1")
|
|
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.2.patch", when="@6.2")
|
|
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.3.patch", when="@6.3")
|
|
patch("0002-add-hipsparse-include.patch", when="@6.4")
|
|
|
|
def setup_build_environment(self, env: EnvironmentModifications) -> None:
|
|
env.set("CXX", self.spec["hip"].hipcc)
|
|
if self.spec.satisfies("+asan"):
|
|
env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
|
|
env.set("TENSILE_ROCM_ASSEMBLER_PATH", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
|
|
env.set(
|
|
"TENSILE_ROCM_OFFLOAD_BUNDLER_PATH",
|
|
f"{self.spec['llvm-amdgpu'].prefix}/bin/clang-offload-bundler",
|
|
)
|
|
env.set(
|
|
"ROCM_AGENT_ENUMERATOR_PATH",
|
|
f"{self.spec['rocminfo'].prefix}/bin/rocm_agent_enumerator",
|
|
)
|
|
if self.spec.satisfies("@6.3:"):
|
|
env.set("ROCM_SMI_PATH", f"{self.spec['rocm-smi-lib'].prefix}/bin/rocm-smi")
|
|
|
|
def cmake_args(self):
|
|
args = [
|
|
self.define("Tensile_CODE_OBJECT_VERSION", "default"),
|
|
self.define("MSGPACK_DIR", self.spec["msgpack-c"].prefix),
|
|
self.define_from_variant("BUILD_ADDRESS_SANITIZER", "asan"),
|
|
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
|
|
self.define("BUILD_SHARED_LIBS", "ON"),
|
|
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
|
|
]
|
|
if "auto" not in self.spec.variants["amdgpu_target"]:
|
|
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
|
|
if self.run_tests:
|
|
args.append(
|
|
self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
|
|
)
|
|
return args
|