Intel Posts Initial Granite Rapids D Support For GCC Compiler, Supports AMX-COMPLEX
The Granite Rapids D help text with the GCC patch notes the instructions supported:
graniterapids-d
Intel graniterapids D CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CX16, SAHF, FXSR, AVX, XSAVE, PCLMUL, FSGSBASE, RDRND, F16C, AVX2, BMI, BMI2, LZCNT, FMA, MOVBE, HLE, RDSEED, ADCX, PREFETCHW, AES, CLFLUSHOPT, XSAVEC, XSAVES, SGX, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, PKU, AVX512VBMI, AVX512IFMA, SHA, AVX512VNNI, GFNI, VAES, AVX512VBMI2, VPCLMULQDQ, AVX512BITALG, RDPID, AVX512VPOPCNTDQ, PCONFIG, WBNOINVD, CLWB, MOVDIRI, MOVDIR64B, AVX512VP2INTERSECT, ENQCMD, CLDEMOTE, PTWRITE, WAITPKG, SERIALIZE, TSXLDTRK, UINTR, AMX-BF16, AMX-TILE, AMX-INT8, AVX-VNNI, AVX512FP16, AVX512BF16, AMX-FP16, PREFETCHI and AMX-COMPLEX instruction set support.
Most notable there and the key instruction difference from Granite Rapids is the addition of AMX-COMPLEX. Earlier this year Intel began adding AMX-COMPLEX to GCC (and LLVM/Clang). When the AMX-COMPLEX information was added to Intel's programmers reference manual, it was noted as being found with Granite Rapids.
Earlier this year it was pointed to AMX-COMPLEX being introduced with Granite Rapids, now it's updated to be found only with "Granite Rapids D".
It now turns out AMX-COMPLEX is only for Granite Rapids D and not all Granite Rapids processors. AMX-COMPLEX adds support for half-precision floating point complex numbers and other updates to Advanced Matrix Extensions that initially premiered with Sapphire Rapids.
Intel's June 2023 documentation update also now reaffirms that only Granite Rapids D adds AMX-COMPLEX support with the AMX-COMPLEX TCMMIMFP16PS/TCMMRLFP16PS instructions.
This Granite Rapids D compiler patch in the process also deletes the AMX-COMPLEX flag from Granite Rapids. Zewei wrote in the patch message, "Also, the patch of removing AMX-COMPLEX from Granite Rapids will be backported to GCC13." So it will be coming down as a fix since with GCC 13.1 right now if targeting just "graniterapids", the compiler thinks AMX-COMPLEX is supported.
The presence of AMX-COMPLEX is also now how GCC is determining if a CPU is Granite Rapids D, besides the 0xae model.
This -march=graniterapids-d support should be picked up soon by GCC Git for the release of GCC 14 early next year while those interested in the enablement patch can find it on the mailing list.