Skip to content
Snippets Groups Projects

Draft: [Feat](Exports) Minor features for export generation

Open Axel Farrugia requested to merge feat_export_refactor into dev

Context

Needed some features to generate the exports (needed for the cpp export refactor) :

  • Now possible to generate a label tensor into the generate_main_cpp() function for result verification at runtime.
  • Add a copy_folder() function and add a symlink argument to create symbolic links instead of simple file copy (help with dev process).
  • Add a function to remove the optional inputs from the order_inputs list so that they are not exported.
  • The ExportNode class now holds a static_folders variable acting as the existing static_files variable but for whole folders.
  • Change the kernels_to_copy export node system as the old system had some limitations. Indeed, it was not possible to chose a destination path different from the source path. Also the copied kernel would be automatically included in the fwd file, sometime leading to unused includes. The new system is based on a list of dict holding, for each kernel file, the source and destination paths as well as a boolean to indicate if the kernel needs to be included in the forward file.

Modified files

  • code_generation.py - Add copy_folder() function and symlink option.

  • export_registry.py - Add static_folder : list of folders to export.

  • scheduler_export.py - Calls the copy_folder() function to export the static_folders. Also change test_mode to dev_mode for more clarity. If the dev_mode is enabled, the copied files will be symbolic links to help with development.

  • generate_main.py - Add label export.

  • main.jinja - Add label export and change default folder for inputs/labels to ROOT/data.

  • main_compare.jinja - Change default folder for inputs/labels to ROOT/data.

  • export_utils.py - Add remove_optional_inputs() to remove the optional inputs of the graph before export.

Edited by Axel Farrugia

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