Skip to content

Adding broadcasting for elem wise operator

Context

While trying to export the ConvNeXt onnx model to cpp, we encountered several issues. We needed to add broadcasting support for operators like add, sub, mul, and div.

  • elemwise.hpp , modified for broadcasting and added div operator;
  • elemwise_config.hpp and elemwise_fowrad.hpp modified for broadcasting;
  • test_export.py, added new unit tests for operator div and broadcasting working for (add, mul, sub )
  • ElemeWise.py , registered div operator

Detailed major modifications

  • Implemented missing operators (div) and support for broadcasting for elemwise operators in C++.
  • Added unit tests.

TODO

Fonctionnal unit test for Div.

  • NOT DONE
  • DONE
  • TO DO
Edited by Matthew Newson

Merge request reports

Loading