Skip to content
Snippets Groups Projects

Draft: [Feat] Add symlinks copies for export

Closed Axel Farrugia requested to merge axelfarr/aidge_core:feat_export_simlinks_copy into dev
1 unresolved thread

Context

It is sometimes tedious to debug on exports as it requires to go through all these steps :

  • Generate a standalone export;
  • Compile and run the code;
  • Finding then solving the bug (testing to verify it has been solved);
  • Then copy the files changes into the export module (often forgetting half of them in the process).

This last step is the one we seek to automate with this MR, as now, the copy_files() and the new copy_folder() function can generate symbolic links instead of actually copying the files.

The ExportNode class now holds a static_folders variable acting as the existing static_files variable but for whole folders.

This MR also adds a function to convert numpy types into c types.

Modified files :file_cabinet: :octopus:

  • export_utils/init.py : Add the copy_folder() function access and the data conversion functions;
  • code_generation.py : Add the copy_folder() function implementation and the symlink argument;
  • export_registry.py : Add the static_folder variable in the ExportNode class;
  • scheduler_export.py : Now export static files and folders and generate symlinks according to the test_mode argument. If test_mode is set to True, symbolic links will be generated to ease the debug process.
  • data_conversion.py : Add the numpy2c converter.
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
51
52 datatype_converter_numpy2c = {
53 np.float64 : "double",
54 np.float32 : "float",
55 np.float16 : "half_float::half",
56 np.int8 : "int8_t",
57 np.int16 : "int16_t",
58 np.int32 : "int32_t",
59 np.int64 : "int64_t",
60 np.uint8 : "uint8_t",
61 np.uint16 : "uint16_t",
62 np.uint32 : "uint32_t",
63 np.uint64 : "uint64_t"
64 }
65
66 def numpy2c(datatype):
  • Cyril Moineau
  • Axel Farrugia marked this merge request as draft

    marked this merge request as draft

  • closed

  • Please register or sign in to reply
    Loading