about summary refs log tree commit diff
path: root/sysdeps/x86/tst-get-cpu-features.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-06-25 15:12:57 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-06-26 06:53:05 -0700
commit4fdd4d41a17dda26c854ed935658154a17d4b906 (patch)
treea5fbd905db96a1ef71ecef14140f19c59f96aac7 /sysdeps/x86/tst-get-cpu-features.c
parent6e540caa21616d5ec5511fafb22819204525138e (diff)
downloadglibc-4fdd4d41a17dda26c854ed935658154a17d4b906.tar.gz
glibc-4fdd4d41a17dda26c854ed935658154a17d4b906.tar.xz
glibc-4fdd4d41a17dda26c854ed935658154a17d4b906.zip
x86: Detect Intel Advanced Matrix Extensions
Intel Advanced Matrix Extensions (Intel AMX) is a new programming
paradigm consisting of two components: a set of 2-dimensional registers
(tiles) representing sub-arrays from a larger 2-dimensional memory image,
and accelerators able to operate on tiles.  Intel AMX is an extensible
architecture.  New accelerators can be added and the existing accelerator
may be enhanced to provide higher performance.  The initial features are
AMX-BF16, AMX-TILE and AMX-INT8, which are usable only if the operating
system supports both XTILECFG state and XTILEDATA state.

Add AMX-BF16, AMX-TILE and AMX-INT8 support to HAS_CPU_FEATURE and
CPU_FEATURE_USABLE.
Diffstat (limited to 'sysdeps/x86/tst-get-cpu-features.c')
-rw-r--r--sysdeps/x86/tst-get-cpu-features.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c
index c60918cf00..dafd66434c 100644
--- a/sysdeps/x86/tst-get-cpu-features.c
+++ b/sysdeps/x86/tst-get-cpu-features.c
@@ -187,6 +187,9 @@ do_test (void)
   CHECK_CPU_FEATURE (TSXLDTRK);
   CHECK_CPU_FEATURE (PCONFIG);
   CHECK_CPU_FEATURE (IBT);
+  CHECK_CPU_FEATURE (AMX_BF16);
+  CHECK_CPU_FEATURE (AMX_TILE);
+  CHECK_CPU_FEATURE (AMX_INT8);
   CHECK_CPU_FEATURE (IBRS_IBPB);
   CHECK_CPU_FEATURE (STIBP);
   CHECK_CPU_FEATURE (L1D_FLUSH);
@@ -239,6 +242,9 @@ do_test (void)
   CHECK_CPU_FEATURE_USABLE (AVX512_4VNNIW);
   CHECK_CPU_FEATURE_USABLE (AVX512_4FMAPS);
   CHECK_CPU_FEATURE_USABLE (AVX512_VP2INTERSECT);
+  CHECK_CPU_FEATURE_USABLE (AMX_BF16);
+  CHECK_CPU_FEATURE_USABLE (AMX_TILE);
+  CHECK_CPU_FEATURE_USABLE (AMX_INT8);
   CHECK_CPU_FEATURE_USABLE (XOP);
   CHECK_CPU_FEATURE_USABLE (FMA4);
   CHECK_CPU_FEATURE_USABLE (XSAVEC);