DequantizeBFP
Description
The BFP dequantization operator. It consumes the raw BFP data and some metadata such as the shape and strides of the original tensor and computes the dequantized tensor. More documentation on the BFP format can be found in this paper: https://www.microsoft.com/en-us/research/publication/pushing-the-limits-of-narrow-precision-inferencing-at-cloud-scale-with-microsoft-floating-point/
Documentation illustration (illustration unavailable in the archive).
Input parameters
specified_outputs_name : array, this parameter lets you manually assign custom names to the output tensors of a node.
Graphs in : cluster, ONNX model architecture.
x (heterogeneous) – T1 : object, 1-D, contiguous, raw, BFP data to be de-quantized.
shape (heterogeneous) – T2 : object, shape of the original tensor.
strides (heterogeneous) – T2 : object, strides of the original tensor.
Documentation illustration (illustration unavailable in the archive).
Parameters : cluster,
bfp_type : enum, the type of BFP – must match with the BFPType enum.
Default value “UNDEFINED”.
block_dim : float, each bounding box spans this dimension.Typically, the block dimension corresponds to the reduction dimension of the matrix multipication that consumes the output of this operator.For example, for a 2D matrix multiplication A@W, QuantizeBFP(A) would use block_dim 1 and QuantizeBFP(W) would use block_dim 0.The default is the last dimension.
Default value “0”.
dtype : enum, the datatype to dequantize to.
Default value “UNDEFINED”.
training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.
name (optional) : string, name of the node.
Documentation illustration (illustration unavailable in the archive).
Output parameters
y (heterogeneous) – T3 : object, de-quantized tensor.
Type Constraints
tensor(uint8)) : Constrain the input to uint8.
T2 in (tensor(int64)) : Constrain shape and strides to uint64.
T3 in (tensor(float), tensor(float16), tensor(bfloat16)) : Constrain y to float and bfloat16.
Example
All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
