Skip to content

Commit 58b16cf

Browse files
authored
Add Intel Granite Rapid features (#125)
Detect Granite Rapid features - AMXFP16 - tile computational operations on FP16 numbers - PREFETCHI - PREFETCHIT0/1 instructions Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
1 parent 7181d30 commit 58b16cf

3 files changed

Lines changed: 201 additions & 191 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ Exit Code 1
269269
| AMD3DNOWEXT | AMD 3DNowExt |
270270
| AMXBF16 | Tile computational operations on BFLOAT16 numbers |
271271
| AMXINT8 | Tile computational operations on 8-bit integers |
272+
| AMXFP16 | Tile computational operations on FP16 numbers |
272273
| AMXTILE | Tile architecture |
273274
| AVX | AVX functions |
274275
| AVX2 | AVX2 functions |
@@ -368,6 +369,7 @@ Exit Code 1
368369
| PCONFIG | PCONFIG for Intel Multi-Key Total Memory Encryption |
369370
| POPCNT | POPCNT instruction |
370371
| PPIN | AMD: Protected Processor Inventory Number support. Indicates that Protected Processor Inventory Number (PPIN) capability can be enabled |
372+
| PREFETCHI | PREFETCHIT0/1 instructions |
371373
| PSFD | AMD: Predictive Store Forward Disable |
372374
| RDPRU | RDPRU instruction supported |
373375
| RDRAND | RDRAND instruction is available |

cpuid.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ const (
7373
AMD3DNOW // AMD 3DNOW
7474
AMD3DNOWEXT // AMD 3DNowExt
7575
AMXBF16 // Tile computational operations on BFLOAT16 numbers
76+
AMXFP16 // Tile computational operations on FP16 numbers
7677
AMXINT8 // Tile computational operations on 8-bit integers
7778
AMXTILE // Tile architecture
7879
AVX // AVX functions
@@ -173,6 +174,7 @@ const (
173174
PCONFIG // PCONFIG for Intel Multi-Key Total Memory Encryption
174175
POPCNT // POPCNT instruction
175176
PPIN // AMD: Protected Processor Inventory Number support. Indicates that Protected Processor Inventory Number (PPIN) capability can be enabled
177+
PREFETCHI // PREFETCHIT0/1 instructions
176178
PSFD // AMD: Predictive Store Forward Disable
177179
RDPRU // RDPRU instruction supported
178180
RDRAND // RDRAND instruction is available
@@ -1175,6 +1177,9 @@ func support() flagSet {
11751177
fs.setIf(edx&(1<<30) != 0, IA32_CORE_CAP)
11761178
fs.setIf(edx&(1<<31) != 0, SPEC_CTRL_SSBD)
11771179

1180+
// CPUID.(EAX=7, ECX=1).EDX
1181+
fs.setIf(edx&(1<<14) != 0, PREFETCHI)
1182+
11781183
// CPUID.(EAX=7, ECX=1)
11791184
eax1, _, _, _ := cpuidex(7, 1)
11801185
fs.setIf(fs.inSet(AVX) && eax1&(1<<4) != 0, AVXVNNI)
@@ -1219,6 +1224,7 @@ func support() flagSet {
12191224
fs.setIf(edx&(1<<25) != 0, AMXINT8)
12201225
// eax1 = CPUID.(EAX=7, ECX=1).EAX
12211226
fs.setIf(eax1&(1<<5) != 0, AVX512BF16)
1227+
fs.setIf(eax1&(1<<21) != 0, AMXFP16)
12221228
}
12231229
}
12241230

0 commit comments

Comments
 (0)