From 7116fb1b7072f522d6f76c51b4490a897bf01fe3 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 6 Jun 2022 09:41:13 -0400 Subject: [PATCH] Kokkos SYCL AOT flags (#30723) * Kokkos SYCL AOT flags * Improve selecting the Intel GPU arch --- .../repos/builtin/packages/kokkos/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 7d1397f966..c51238a8fd 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -161,6 +161,18 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): conflicts('+rocm', when='amdgpu_target={0}'.format(arch), msg=amd_support_conflict_msg.format(arch)) + intel_gpu_arches = ( + 'intel_gen', + 'intel_gen9', + 'intel_gen11', + 'intel_gen12lp', + 'intel_dg1', + 'intel_xehp', + 'intel_pvc' + ) + variant("intel_gpu_arch", default='none', values=('none',) + intel_gpu_arches, + description="Intel GPU architecture") + devices_values = list(devices_variants.keys()) for dev in devices_variants: dflt, desc = devices_variants[dev] @@ -289,6 +301,9 @@ def cmake_args(self): raise SpackError("Unsupported target: {0}".format( amdgpu_target)) + if self.spec.variants['intel_gpu_arch'].value != 'none': + spack_microarches.append(self.spec.variants['intel_gpu_arch'].value) + for arch in spack_microarches: options.append(self.define("Kokkos_ARCH_" + arch.upper(), True))