Skip to content
Snippets Groups Projects

Draft: CMSIS_NN integration

Closed Wissam Boussella requested to merge wboussella/aidge_export_arm_cortexm:master into dev

Context

#6 (closed) This merge request contains tools for exporting quantized neural networks to Arm Cortex M targets, using the Arm CMSIS_NN library.

It contains :

  • New templates for generating code (Fully Connected, Conv, Max Pooling, Relu)
  • A merge of the Conv Relu Scaling and Fully Connected Relu Scaling nodes
  • A function to convert a scaling parameter into a shift and a multiply.
  • Unit tests in the form of small layer exports, with expected outputs in the console

This export is optimized for CMSIS_NN 6.0

For the moment, only 8-bit quantization is available; a 4-bit and 16-bit version will soon be available.

Note: several TODOs remain, including a Datatype problem not yet solved, an input problem after quantization, etc.

Modified files

  • operator.py add Cmsis_nn option for many operators
  • export.py, merging operator, copy CMSIS_nn files, delete identity layer

TODO

  • Int4 Int16 for CMSIS_NN
  • Use get_opertor.Datatype()
  • No input after quantization
  • Operator LSTM, Softmax, SVDF, Reshape
Edited by Grégoire Kubler

Merge request reports

Approval is optional

Closed by Olivier BICHLEROlivier BICHLER 4 months ago (Jan 16, 2025 2:40pm UTC)

Merge details

  • The changes were not merged into dev.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading