Handling of Int64 variables when exporting model to Arm Cortex-M
Problem description
Some operators have input/output data types not supported by the platform. This is the case for the Producer, Gather, Slice and Reshape operators, whose inputs/outputs are/can be of type Int64.
For the Gather operator, the second input is called "indices" and is of type Int64. In what follows, we assume that it is constant in the model and produced by a producer. When exporting the model, we encounter the following situation:
- The value of "indices" will be exported as a parameter of type "const int64_t" in the "dnn/include/parameters" folder (according to the default conversion table defined in "aidge_core/export_utils/data_conversion.py"), but will not be used later in "dnn/src/forward.cpp".
- The value of "indices" is also converted and exported as a parameter of type "const int" according to the instructions defined in "/templates/configuration/gather.jinja". This parameter will ultimately be provided as an argument to the kernel method "aidge_gather_chw_float32" when it is called in "dnn/src/forward.cpp".
This way of handling Int64 values will not work if the value changes during inference on the platform. Furthermore, the conversion from Int64 to Int32 is done behind the scene, which is not good.