Skip to content

[Fix] Graph's input memory offset

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

Two changes have been made to correct these default offsets :

  • in_size was replaced by in_chan when needed, according to what was found within the memory manager functions;
  • in_sizeof was added to make sure that the values actually are in bytes as it has recently been chosen.

Merge request reports

Loading