Overview of the MatMul Operator
mainThe MatMul (Matrix Multiplication) operator in ZenDNN provides accelerated inference for deep learning workloads on AMD Zen architectures. It supports multiple data types including F32, BF16, F16 (half-precision), and INT8, as well as Weight-Only Quantization (WOQ) with S4/U4 weights.
Key Features:
- Flexible Post-Operations: Supports optional bias addition, activation functions (ReLU, GELU, Sigmoid, Tanh, SiLU, Mish), and binary operations (Add, Mul).
- Batch Support: Supports both 2D matrix multiplication and batched matrix multiplication (BS x M x K).
- Composition: Allows chaining multiple post-operations (e.g., MatMul + Bias + Activation + BinaryOp).
Hardware Note: F16 (half-precision) operations require AVX512-FP16 support. If the CPU lacks this instruction set, the operator returns status_t::isa_unsupported.