mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 15:12:30 +02:00
Add Intel AMX-FP16 detection (#332)
This commit is contained in:
parent
688decfc80
commit
312e990c6f
@ -86,6 +86,7 @@ typedef struct {
|
||||
int amx_bf16 : 1;
|
||||
int amx_tile : 1;
|
||||
int amx_int8 : 1;
|
||||
int amx_fp16 : 1;
|
||||
|
||||
int pclmulqdq : 1;
|
||||
int smx : 1;
|
||||
@ -254,6 +255,7 @@ typedef enum {
|
||||
X86_AMX_BF16,
|
||||
X86_AMX_TILE,
|
||||
X86_AMX_INT8,
|
||||
X86_AMX_FP16,
|
||||
X86_PCLMULQDQ,
|
||||
X86_SMX,
|
||||
X86_SGX,
|
||||
|
@ -450,6 +450,7 @@ static void ParseCpuId(const Leaves* leaves, X86Info* info,
|
||||
features->amx_bf16 = IsBitSet(leaf_7.edx, 22);
|
||||
features->amx_tile = IsBitSet(leaf_7.edx, 24);
|
||||
features->amx_int8 = IsBitSet(leaf_7.edx, 25);
|
||||
features->amx_fp16 = IsBitSet(leaf_7_1.eax, 21);
|
||||
}
|
||||
} else {
|
||||
// When XCR0 is not available (Atom based or older cpus) we need to defer to
|
||||
@ -1976,6 +1977,7 @@ CacheInfo GetX86CacheInfo(void) {
|
||||
LINE(X86_AMX_BF16, amx_bf16, , , ) \
|
||||
LINE(X86_AMX_TILE, amx_tile, , , ) \
|
||||
LINE(X86_AMX_INT8, amx_int8, , , ) \
|
||||
LINE(X86_AMX_FP16, amx_fp16, , , ) \
|
||||
LINE(X86_PCLMULQDQ, pclmulqdq, , , ) \
|
||||
LINE(X86_SMX, smx, , , ) \
|
||||
LINE(X86_SGX, sgx, , , ) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user