From 2c009a3226a6afc0dfa031722d30fff0dd0bd487 Mon Sep 17 00:00:00 2001
From: Andrew Gaspar <agaspar@lanl.gov>
Date: Mon, 11 May 2020 11:33:34 -0600
Subject: Map the spack skylake arch to Kokkos BDW, rather than SKX (#16583)

SKX includes AVX-512 extensions that consumer Skylake processors do
not have. Therefore, map Skylake to the prior arch to work on
these systems. Skylake-X processors will still map as the
skylake_avx512 spack arch and get the correct optimzations.
---
 var/spack/repos/builtin/packages/kokkos/package.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'var')

diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py
index fef37d2ac7..b5277e40a8 100644
--- a/var/spack/repos/builtin/packages/kokkos/package.py
+++ b/var/spack/repos/builtin/packages/kokkos/package.py
@@ -120,7 +120,12 @@ class Kokkos(CMakePackage, CudaPackage):
         "core2": None,
         "ivybridge": "SNB",
         "broadwell": "BDW",
-        "skylake": "SKX",
+        # @AndrewGaspar: Kokkos does not have an arch for plain-skylake - only
+        # for Skylake-X (i.e. Xeon). For now, I'm mapping this to Broadwell
+        # until Kokkos learns to optimize for SkyLake without the AVX-512
+        # extensions. SkyLake with AVX-512 will still be optimized using the
+        # separate `skylake_avx512` arch.
+        "skylake": "BDW",
         "icelake": "SKX",
         "skylake_avx512": "SKX",
     }
-- 
cgit v1.2.3-70-g09d2