Skip to content

fix(Relu, Quant): Re-order Relu to be above Quantization.#290

Open
nogieman wants to merge 1 commit into
vicharak-in:mainfrom
nogieman:quant_relu_reorder
Open

fix(Relu, Quant): Re-order Relu to be above Quantization.#290
nogieman wants to merge 1 commit into
vicharak-in:mainfrom
nogieman:quant_relu_reorder

Conversation

@nogieman

@nogieman nogieman commented Jan 29, 2026

Copy link
Copy Markdown
Member

#PR Summary:

@nogieman nogieman requested a review from dpks2003 January 29, 2026 07:40
@nogieman

nogieman commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

The PR has been tested on Cifar10_int8.onnx and yolov8n models (9x4x4 architecture).
Will update after testing on mobilenet with 16x1x16 architecture. @dpks2003 @Prem-Swarup

@nogieman nogieman force-pushed the quant_relu_reorder branch 2 times, most recently from 84bdc05 to da7d2ab Compare January 29, 2026 10:04
@nogieman

Copy link
Copy Markdown
Member Author

It has been tested with imagenet_mobilenetv2-int8-symmetric.onnx and cifar10 mobilenet with 16x1x16 architecture.

@dpks2003

Copy link
Copy Markdown
Member

please check it on all the existing model and update the accuracy here and compare with already existing accuracy.

@dpks2003

Copy link
Copy Markdown
Member

the PR is approved will merge after getting the accuracy numbers.
@nogieman good job with quick work

@dpks2003 dpks2003 self-requested a review January 29, 2026 11:48
@dpks2003

Copy link
Copy Markdown
Member

PR on hold as lack of clarity.

@dpks2003 dpks2003 added bbst blocked by software team and removed bbst blocked by software team labels Jan 29, 2026
@nogieman

Copy link
Copy Markdown
Member Author

Accuracy Comparison (CPU vs FPGA)

Model CPU Accuracy FPGA Accuracy
cifar10_average_pool_int8.onnx 70% 70%
cifar10_int8.onnx 77% 77–79%
cifar10_vgg11.onnx 95% 95%
cifar10_vgg16.onnx 96% 96%
cifar10_vgg19.onnx 96% 96%
cifar10_mobilenetv2_x0_5.onnx 93% 92–93%
cifar10_mobilenetv2_x0_75.onnx 93% 92–93%
cifar10_mobilenetv2_x1_0.onnx 93% 93%
cifar10_mobilenetv2_x1_4.onnx 93% 92–93%
cifar10_sig_model2_int8.onnx 75% 73–75%
mnist_average_pool_int8.onnx 100% 99–100%
mnist_int8_k1x7_nomaxpool.onnx 99% 99%
mnist_int8_pad2.onnx 86% 86%
mnist_int8_pad4343.onnx 100% 100%
mnist_int8_stride2.onnx 75% 75%
mnist_int8_stride2_pad0.onnx 88% 88%
mnistpad1_6_28_int8.onnx 99% 99%
mnist_qlinearadd2.onnx 94% 94%
imagenet_mobilenetv2-int8-symmetric.onnx 80% 78-80%

- Relu now takes input from `top_bias_block` and feeds output to `top_quant_gen`.
- Input bit-widths have been changed accordingly.
- Solved minor issues in docs that give warnings.
@nogieman nogieman changed the title bug_fix(Relu, Quant): Re-order Relu to be above Quantization. fix(Relu, Quant): Re-order Relu to be above Quantization. Jan 29, 2026
@dpks2003 dpks2003 added the bbst blocked by software team label Jan 29, 2026
@dpks2003

dpks2003 commented Feb 3, 2026

Copy link
Copy Markdown
Member

This pr is on hold as further discussion and simulations are to be done on this.

@dpks2003

dpks2003 commented Feb 3, 2026

Copy link
Copy Markdown
Member

The SA needs to be converted to the uint8 and so are the other compute blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bbst blocked by software team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants