summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Arndt <arndtd@ornl.gov>2022-06-06 09:41:13 -0400
committerGitHub <noreply@github.com>2022-06-06 15:41:13 +0200
commit7116fb1b7072f522d6f76c51b4490a897bf01fe3 (patch)
tree05381c6be424efbe8a704057888653b75ccc0a44
parent9b713fa6a6bc52c10d8b21f5d43870a4fd9dbca7 (diff)
downloadspack-7116fb1b7072f522d6f76c51b4490a897bf01fe3.tar.gz
spack-7116fb1b7072f522d6f76c51b4490a897bf01fe3.tar.bz2
spack-7116fb1b7072f522d6f76c51b4490a897bf01fe3.tar.xz
spack-7116fb1b7072f522d6f76c51b4490a897bf01fe3.zip
Kokkos SYCL AOT flags (#30723)
* Kokkos SYCL AOT flags * Improve selecting the Intel GPU arch
-rw-r--r--var/spack/repos/builtin/packages/kokkos/package.py15
1 files changed, 15 insertions, 0 deletions
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 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
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))