feat: Add missing operators for AIDGE model benchmarking
Context
I am working on benchmarking AIDGE models by fully creating them in AIDGE, setting their weights randomly, and exporting them to C++. The goal is to verify if the outputs in C++ match the forward pass results in AIDGE. You can find it here
To achieve this, I have added several missing operators necessary for running models such as:
- SqueezeNet
- ResNet18 / ResNet50
- MLP for MNIST
- MobileNet
These operators are now available in the export pipeline to ensure proper benchmarking.
Modified Files
-
Operators & Kernels
-
aidge_export_cpp/kernels/batchnorm.hpp
: Added missing batch normalization operator. -
aidge_export_cpp/kernels/concat.hpp
: Added concatenation operator. -
aidge_export_cpp/kernels/pad.hpp
: Added padding operator. -
aidge_export_cpp/kernels/pooling.hpp
: Added AvgPooling2D. -
aidge_export_cpp/kernels/softmax.hpp
: Added softmax operator.
-
-
Python Script
-
aidge_export_cpp/operators.py
: Updated operator handling to include new additions.
-
-
Configuration Templates
-
aidge_export_cpp/templates/configuration/*
: Added configurations for batchnorm, concat, pad, and softmax.
-
-
Kernel Forward Templates
-
aidge_export_cpp/templates/kernel_forward/*
: Added missing forward implementations for batchnorm, concat, pad, and softmax.
-
-
Unit Tests
-
aidge_export_cpp/unit_tests/test_export.py
: Updated tests to validate newly added operators.
-
Detailed Major Modifications
- Implemented missing operators to support model export and validation in C++.
- Ensured each new operator follows the existing API.
- Updated test cases to validate correctness of the exported model execution.
- Added the possibility of setting the weights inside the model randomly or with a default value to stay deterministic for the unit tests
TODO
-
Add some of the missing args of Pad2D. Do add assertion for now that attribute for padding is constant fill (i.e.do not support other attributes such as mirror etc...).
Edited by Gallas Gaye
Merge request reports
Activity
Filter activity
Please register or sign in to reply