Skip to content

Ap fixed omode

Javier Duarte requested to merge ApFixedOmode into master

Created by: zhenbinwu

The default ap_fixed has the overflow mode as AP_WRAP, which will cause the number to change significantly from original input.

For example, with the initial value of 8.99, the default ap_fixed<10,4> will cast it to -7.01563, while the new ap_fixed<10, 4, AP_TRN_ZERO, AP_SAT> will cast it to 7.98438.

The change of ap_fixed type only apply to the node output of each layer for now, to prevent overflow during the run time. The weights and bias are still stored as default input type. The resource usage remain the same from this type change.

Merge request reports

Loading