From 01747b50dfc4ffe19950ea8bcf1e1697bb0a49cd Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:43:21 -0400 Subject: fix ck build for 5.6.1 (#40304) * initial commit to fix ck build for 5.6.1 * disable mlir for miopen-hip * use satisfies for checking specs and add nlohmann-json dependency for 5.4 onwards --- var/spack/repos/builtin/packages/composable-kernel/package.py | 7 ++++++- var/spack/repos/builtin/packages/miopen-hip/package.py | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/composable-kernel/package.py b/var/spack/repos/builtin/packages/composable-kernel/package.py index efa05197f9..85b383896a 100644 --- a/var/spack/repos/builtin/packages/composable-kernel/package.py +++ b/var/spack/repos/builtin/packages/composable-kernel/package.py @@ -64,9 +64,14 @@ class ComposableKernel(CMakePackage): ] if "auto" not in self.spec.variants["amdgpu_target"]: args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target")) + if self.spec.satisfies("@5.6.1:"): + args.append(self.define("INSTANCES_ONLY", "ON")) return args def build(self, spec, prefix): with working_dir(self.build_directory): # only instances is necessary to build and install - make("instances") + if self.spec.satisfies("@5.6.1:"): + make() + else: + make("instances") diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index 4843ae1173..6ab2967ac2 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -160,6 +160,7 @@ class MiopenHip(CMakePackage): depends_on("nlohmann-json", type="link") depends_on("composable-kernel@" + ver, when="@" + 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) def setup_build_environment(self, env): @@ -216,6 +217,7 @@ class MiopenHip(CMakePackage): if self.spec.satisfies("@5.5.1:"): args.append(self.define("MIOPEN_USE_COMPOSABLEKERNEL", "ON")) args.append(self.define("MIOPEN_ENABLE_AI_KERNEL_TUNING", "OFF")) + args.append(self.define("MIOPEN_USE_MLIR", "OFF")) args.append( "-DNLOHMANN_JSON_INCLUDE={0}".format(self.spec["nlohmann-json"].prefix.include) ) -- cgit v1.2.3-70-g09d2