torch.cpu.get_capabilities
- torch.cpu.get_capabilities()
Returns an immutable mapping of CPU capabilities detected at runtime.
This function queries the CPU for supported instruction sets and features using cpuinfo. The result is cached after the first call for efficiency.
The returned mapping contains architecture-specific capabilities:
- For x86/x86_64:
SSE family: sse, sse2, sse3, ssse3, sse4_1, sse4_2, sse4a
AVX family: avx, avx2, avx_vnni
AVX-512 family: avx512_f, avx512_cd, avx512_dq, avx512_bw, avx512_vl, avx512_ifma, avx512_vbmi, avx512_vbmi2, avx512_bitalg, avx512_vpopcntdq, avx512_vnni, avx512_bf16, avx512_fp16, avx512_vp2intersect, avx512_4vnniw, avx512_4fmaps
AVX10 family: avx10_1, avx10_2