Kokkos SYCL AOT flags (#30723)
* Kokkos SYCL AOT flags * Improve selecting the Intel GPU arch
This commit is contained in:
parent
9b713fa6a6
commit
7116fb1b70
1 changed files with 15 additions and 0 deletions
|
@ -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))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue