Skip to content

[Feat] Add "in_sizeof" attribute to the export node

Axel Farrugia requested to merge fix_in_mem_offset into dev

Context

The memory manager generates offsets for each output of each layer within the graph, following a given layout (optimized, wrapping, ...).
Then each kernel within the CPP Export needs to get this memory layout for both its inputs and outputs.

However in the case of the very first layer of the graph, the memory layout of the input was not generated (as it is not the output of any layer).
Then default values were set within the _meminfo.jinja template file, assuming the input would always be contiguous data.
However these default values were not correct, causing buffer overflow and segfault.

Changes

This MR aims to add the in_sizeof attribute within the ExportNode so that it could be used whithin the templates to set the default offsets as bytes instead of words.

To do so, it also binds the dtype_bit_width() function.

This MR is used within this other MR.

Merge request reports

Loading