CPU feature detection and dispatch macros. More...
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | ck_capability_t |
| CPU capability information structure. More... | |
Macros | |
| #define | CK_GEMM_DISPATCH(...) gemm_ref(__VA_ARGS__) |
| Dispatch to best available GEMM kernel. More... | |
| #define | CK_GEMV_DISPATCH(...) gemv_ref(__VA_ARGS__) |
| Dispatch to best available GEMV kernel. More... | |
| #define | CK_HAS_AI_ACCEL 0 |
| #define | CK_HAS_BEST_VECTOR 0 |
| #define | CK_QGEMM_DISPATCH(...) qgemm_ref(__VA_ARGS__) |
| Dispatch to best available quantized GEMV kernel For INT8/INT4 quantization with VNNI/AMX acceleration. More... | |
| #define | CK_VECTOR_WIDTH 32 /* Scalar fallback */ |
Functions | |
| static ck_capability_t | ck_get_capabilities (void) |
| Get current platform capabilities. More... | |
CPU feature detection and dispatch macros.
Defines standardized macros for SIMD instruction set detection and kernel dispatch. Use these instead of CPU model checks.
Feature Priority (best available): AMX (512-bit tile ops, Intel Sapphire Rapids+) AVX-512 (512-bit vector, Intel Skylake-X+) AVX2 (256-bit with FMA, Intel Haswell+) AVX (256-bit, Intel Sandy Bridge+) NEON/SVE2 (ARM) DSA (PowerPC) Reference (fallback)
Definition in file ck_features.h.
| #define CK_GEMM_DISPATCH | ( | ... | ) | gemm_ref(__VA_ARGS__) |
Dispatch to best available GEMM kernel.
Usage: CK_GEMM_DISPATCH(y, W, x, M, K); expands to appropriate kernel call
Definition at line 174 of file ck_features.h.
| #define CK_GEMV_DISPATCH | ( | ... | ) | gemv_ref(__VA_ARGS__) |
Dispatch to best available GEMV kernel.
Definition at line 189 of file ck_features.h.
| #define CK_HAS_AI_ACCEL 0 |
Definition at line 150 of file ck_features.h.
| #define CK_HAS_BEST_VECTOR 0 |
Definition at line 139 of file ck_features.h.
| #define CK_QGEMM_DISPATCH | ( | ... | ) | qgemm_ref(__VA_ARGS__) |
Dispatch to best available quantized GEMV kernel For INT8/INT4 quantization with VNNI/AMX acceleration.
Definition at line 205 of file ck_features.h.
| #define CK_VECTOR_WIDTH 32 /* Scalar fallback */ |
Definition at line 138 of file ck_features.h.
|
inlinestatic |
Get current platform capabilities.
Definition at line 226 of file ck_features.h.
References ck_capability_t::best_kernel, ck_capability_t::has_ai_accel, ck_capability_t::has_fma, ck_capability_t::name, and ck_capability_t::width.
Referenced by main().