Kokkos SYCL AOT flags (#30723)

* Kokkos SYCL AOT flags

* Improve selecting the Intel GPU arch
This commit is contained in:
Daniel Arndt 2022-06-06 09:41:13 -04:00 committed by GitHub
parent 9b713fa6a6
commit 7116fb1b70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,6 +161,18 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
conflicts('+rocm', when='amdgpu_target={0}'.format(arch), conflicts('+rocm', when='amdgpu_target={0}'.format(arch),
msg=amd_support_conflict_msg.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()) devices_values = list(devices_variants.keys())
for dev in devices_variants: for dev in devices_variants:
dflt, desc = devices_variants[dev] dflt, desc = devices_variants[dev]
@ -289,6 +301,9 @@ def cmake_args(self):
raise SpackError("Unsupported target: {0}".format( raise SpackError("Unsupported target: {0}".format(
amdgpu_target)) 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: for arch in spack_microarches:
options.append(self.define("Kokkos_ARCH_" + arch.upper(), True)) options.append(self.define("Kokkos_ARCH_" + arch.upper(), True))