add Cpu::tAVX512_FP16
This commit is contained in:
parent
1554f479cb
commit
acd360c38f
2 changed files with 4 additions and 1 deletions
|
@ -83,6 +83,7 @@ void putCPUinfo()
|
||||||
{ Cpu::tAMX_INT8, "amx(int8)" },
|
{ Cpu::tAMX_INT8, "amx(int8)" },
|
||||||
{ Cpu::tAMX_BF16, "amx(bf16)" },
|
{ Cpu::tAMX_BF16, "amx(bf16)" },
|
||||||
{ Cpu::tAVX_VNNI, "avx_vnni" },
|
{ Cpu::tAVX_VNNI, "avx_vnni" },
|
||||||
|
{ Cpu::tAVX512_FP16, "avx512_fp16" },
|
||||||
};
|
};
|
||||||
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
|
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
|
||||||
if (cpu.has(tbl[i].type)) printf(" %s", tbl[i].str);
|
if (cpu.has(tbl[i].type)) printf(" %s", tbl[i].str);
|
||||||
|
|
|
@ -367,7 +367,8 @@ public:
|
||||||
static const Type tAMX_INT8 = uint64_t(1) << 60;
|
static const Type tAMX_INT8 = uint64_t(1) << 60;
|
||||||
static const Type tAMX_BF16 = uint64_t(1) << 61;
|
static const Type tAMX_BF16 = uint64_t(1) << 61;
|
||||||
static const Type tAVX_VNNI = uint64_t(1) << 62;
|
static const Type tAVX_VNNI = uint64_t(1) << 62;
|
||||||
// 11, 18, 63
|
static const Type tAVX512_FP16 = uint64_t(1) << 11;
|
||||||
|
// 18, 63
|
||||||
|
|
||||||
Cpu()
|
Cpu()
|
||||||
: type_(NONE)
|
: type_(NONE)
|
||||||
|
@ -468,6 +469,7 @@ public:
|
||||||
if (EDX & (1U << 2)) type_ |= tAVX512_4VNNIW;
|
if (EDX & (1U << 2)) type_ |= tAVX512_4VNNIW;
|
||||||
if (EDX & (1U << 3)) type_ |= tAVX512_4FMAPS;
|
if (EDX & (1U << 3)) type_ |= tAVX512_4FMAPS;
|
||||||
if (EDX & (1U << 8)) type_ |= tAVX512_VP2INTERSECT;
|
if (EDX & (1U << 8)) type_ |= tAVX512_VP2INTERSECT;
|
||||||
|
if ((type_ & tAVX512BW) && (EDX & (1U << 23))) type_ |= tAVX512_FP16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue