Quantization Workflow Prerequisites
This page describes the products required to quantize, simulate, and deploy deep learning networks using Deep Learning Toolbox Model Quantization Library. The prerequisites required depend on your selections at each stage of the quantization workflow.
Prerequisites for All Quantization Workflows
The following requirements apply to all stages of the quantization workflow.
Deep Learning Toolbox™
Supported Networks and Layers
The target hardware associated with each execution environment determines the supported networks and layers for that environment.
GPU — Supports networks and layers that support code generation for the CUDA® Deep Neural Network library (cuDNN). For a list of these networks and layers, see Supported Networks, Layers, and Classes (GPU Coder)
FPGA — Supports networks and layers that support code generation for Xilinx® and Intel® FPGA and SoC devices. For a list of these networks and layers, see Supported Networks, Layers, Boards, and Tools (Deep Learning HDL Toolbox)
CPU — Supports networks and layers that support code generation for the ARM® Compute Library. For a list of these networks and layers, see Networks and Layers Supported for Code Generation (MATLAB Coder)
MATLAB — Supports networks and layers that support code generation for the Intel MKL-DNN Compute Library. For a list of these networks and layers, see Networks and Layers Supported for Code Generation (MATLAB Coder)
Prerequisites for Calibration
The prerequisites for calibration depend on your selection of calibration environment.
Calibrate on host GPU —
Parallel Computing Toolbox™
GPU Coder™ Interface for Deep Learning
CUDA enabled NVIDIA® GPU with compute capability 3.5 or higher.
Supported C/C++ Compiler
On Windows®, the
MinGW C/C++
compiler is not supported. UseMicrosoft Visual C++ 2022
,Microsoft Visual C++ 2019
, orMicrosoft Visual C++ 2017
.On Linux®, use a GCC C/C++ compiler.
For a list of supported compilers, see Supported and Compatible Compilers.
Calibrate on host CPU —
MATLAB® Coder™ Interface for Deep Learning or GPU Coder Interface for Deep Learning
Prerequisites for Quantization
The following are required to quantize your network for simulation in MATLAB using the quantize
function or the
Export > Export Quantized Network option in the Deep
Network Quantizer app.
When you use the MATLAB Execution Environment, a Fixed-Point Designer™ license is required for quantization.
When you use the CPU Execution Environment, the quantization step is not supported.
When you use any other Execution Environment for quantization, no additional prerequisites are required.
Prerequisites for Validation
The following are required to validate your quantized network for deployment using the
validate
function or the Validate button
in the Deep Network Quantizer app.
Execution Environment | Prerequisites for Validation |
---|---|
GPU |
|
FPGA |
|
CPU |
|
MATLAB |
|
For CPU and GPU deployment, the software generates code for a deep neural network by
quantizing the weights, biases, and activations of the convolution layers to 8-bit
scaled integer data types. The quantization is performed by providing the calibration
result file produced by the calibrate
function to the codegen
(MATLAB Coder) command.
Code generation does not support quantized deep neural networks produced by the
quantize
function.
Validation on target hardware for CPU, FPGA, and GPU execution environments is not supported in MATLAB Online™. For FPGA and GPU execution environments, validation can be performed through emulation on the MATLAB Online host. GPU validation can also be performed if GPU support has been added to your MATLAB Online Server™ cluster. For more information on GPU support for MATLAB Online, see Configure GPU Support in MATLAB Online Server (MATLAB Online Server).