diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py index d1fa495090..9435c1a8ec 100644 --- a/var/spack/repos/builtin/packages/rocm-opencl/package.py +++ b/var/spack/repos/builtin/packages/rocm-opencl/package.py @@ -24,13 +24,19 @@ def url_for_version(self, version): return ( "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-3.5.0.tar.gz" ) - - url = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz" + elif version <= Version("5.6.1"): + url = ( + "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz" + ) + else: + url = "https://github.com/ROCm/clr/archive/refs/tags/rocm-{0}.tar.gz" return url.format(version) license("MIT") version("master", branch="main") + version("5.7.1", sha256="c78490335233a11b4d8a5426ace7417c555f5e2325de10422df06c0f0f00f7eb") + version("5.7.0", sha256="bc2447cb6fd86dff6a333b04e77ce85755104d9011a14a044af53caf02449573") version("5.6.1", sha256="ec26049f7d93c95050c27ba65472736665ec7a40f25920a868616b2970f6b845") version("5.6.0", sha256="52ab260d00d279c2a86c353901ffd88ee61b934ad89e9eb480f210656705f04e") version("5.5.1", sha256="a8a62a7c6fc5398406d2203b8cb75621a24944688e545d917033d87de2724498") @@ -194,12 +200,14 @@ def url_for_version(self, version): "5.5.1", "5.6.0", "5.6.1", + "5.7.0", + "5.7.1", "master", ]: depends_on("comgr@" + ver, type="build", when="@" + ver) depends_on("hsa-rocr-dev@" + ver, type="link", when="@" + ver) - for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]: depends_on("rocm-core@" + ver, when="@" + ver) @classmethod @@ -244,9 +252,13 @@ def cmake_args(self): "-DROCclr_DIR={0}".format(self.spec["hip-rocclr"].prefix), "-DLIBROCclr_STATIC_DIR={0}/lib".format (self.spec["hip-rocclr"].prefix) - if "@4.5.0:" in self.spec: + if self.spec.satisfies("@4.5: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:"): + args.append(self.define("CLR_BUILD_HIP", False)) + args.append(self.define("CLR_BUILD_OCL", True)) + return args def setup_run_environment(self, env):