Skip to content
Snippets Groups Projects
Commit 36932a63 authored by Branislav Jansik's avatar Branislav Jansik
Browse files

Update AMX functionality

parent 3900a9f5
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ void cpuid(unsigned infoa, unsigned infoc, unsigned *eax, unsigned *ebx, unsigne
}
int main(void) {
unsigned eax, ebx, ecx, edx;
unsigned eax, ebx, ecx, edx, maxl;
int off;
#define LLEN 50
#define LNUM 50
......@@ -27,6 +27,8 @@ char buf[LLEN*LNUM];
memset(buf,32,LLEN*LNUM);
cpuid(0,0,&maxl,&ebx,&ecx,&edx);
cpuid(0x80000001,0,&eax,&ebx,&ecx,&edx);
BPRINT(0,0,"x86_64 : %d", (int) getbits(edx,29,1));
......@@ -65,12 +67,18 @@ BPRINT(3,1, "AVX512-4fmaps : %d", (int) getbits(edx,3,1));
BPRINT(4,1, "AVX512vp2intersect : %d", (int) getbits(edx,8,1));
BPRINT(5,1, "AVX512fp16 : %d", (int) getbits(edx,23,1));
BPRINT(12,1, "AMX-bf16 : %d", (int) getbits(edx,22,1));
BPRINT(20,1, "AMX-tile : %d", (int) getbits(edx,24,1));
BPRINT(11,1, "AMX-int8 : %d", (int) getbits(edx,25,1));
cpuid(7,1,&eax,&ebx,&ecx,&edx);
BPRINT(6,1, "AVX512bf16 : %d", (int) getbits(eax,5,1));
cpuid(0x1E,1,&eax,&ebx,&ecx,&edx);
BPRINT(11,1,"AMX-int8 : %d", (int) getbits(eax,0,1));
BPRINT(12,1,"AMX-bf16 : %d", (int) getbits(eax,1,1));
if (maxl >= 0x1E) cpuid(0x1E,1,&eax,&ebx,&ecx,&edx);
else eax=0;
//BPRINT(11,1,"AMX-int8 : %d", (int) getbits(eax,0,1));
//BPRINT(12,1,"AMX-bf16 : %d", (int) getbits(eax,1,1));
BPRINT(13,1,"AMX-complex : %d", (int) getbits(eax,2,1));
BPRINT(14,1,"AMX-fp16 : %d", (int) getbits(eax,3,1));
BPRINT(15,1,"AMX-fp8 : %d", (int) getbits(eax,4,1));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment