Skip to content
Snippets Groups Projects

[Fix] Tensor::setDataFormat handling of DataFormat::Default

Merged Maxence Naud requested to merge fix_314-dataformat-default into dev

Context

Fix aidge_backend_cpu#42

Implement back the behaviour of setDataFormat lost in !314 (merged) that transposing Tensor from/to DataFormat::Default does not lead to any data transposition. Only the dataFormat is changed.

Major modification

  • upd: in DataFormat.hpp, change 'getDataFormatTranspose' name to 'getPermutationMapping'
  • upd: use X-macro to keep DataFormat enum, string value, permutation with NCHW and description in synch
  • add: number of dimensions information to X-macro
  • upd: change 'DataFormatTransposeDict' array to 'permutationFromNCHW' and move it to a static function 'getPermutationFromNCHW'
  • fix: do not transpose data in Tensor if current or new format is Default
Edited by Maxence Naud

Merge request reports

Loading
Loading

Activity

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