CPU VNNI Instructions: Boosting INT8 Operations on Intel Processors
Intel's Deep Learning Boost, featuring Vector Neural Network Instructions (VNNI), allows modern CPUs (like Intel Xeon Scalable processors) to perform INT8 operations significantly more efficiently. CPUs with VNNI can achieve noticeable speedups for INT8 quantized models compared to higher precision formats, improving throughput by fusing multiple operations.
The top 3
- VNNI's Genesis: Merging 3 Instructions into 1 for INT8: Intel introduced Vector Neural Network Instructions (VNNI) with its 2nd Gen Xeon Scalable processors (Cascade Lake) as part of Intel Deep Learning Boost. VNNI consolidates three separate AVX-512 instructions (vpmaddubsw, vpmaddwd, vpaddd) used in INT8 convolution operations into a single instruction, 'vpdpbusd', dramatically improving efficiency for deep learning inference workloads.
- VNNI's Performance Leap: Up to 3x Faster INT8 Inference: VNNI instructions can provide significant performance gains for INT8 deep learning inference, with theoretical speedups of up to 3x compared to FP32 operations. For instance, image classification tests showed a 2.18x performance improvement using INT8 with VNNI on 2nd Gen Intel Xeon Scalable processors (Cascade Lake) over FP32 on previous generations, while maintaining less than 1% accuracy loss.
- VNNI's Evolution: From AVX-512 to Client AVX-VNNI & AMX: Initially part of AVX-512, VNNI evolved to include AVX-VNNI, a VEX-coded 256-bit variant for broader CPU support, including Intel's Alder Lake and Sapphire Rapids. Newer 4th Gen Intel Xeon Scalable processors (Sapphire Rapids) introduced Advanced Matrix Extensions (AMX), which significantly extend AI acceleration beyond VNNI, offering 2,048 INT8 operations per cycle compared to AVX-512 VNNI's 256, utilizing a new tiled architecture for even greater performance.
Open the full topic