Skip to content

Export refactor

Cyril Moineau requested to merge allowNoInputProducer into dev

Context

&12

Changes

  • Mutualize meminfo between exports
    • Make work Aidge memory manager (currently a simple version is used ...)
    • Add meminfo in export_node
  • Create ExportScheduler to mutualize function between exports
    • Better handle input/ouput of graph by avoiding double memory allocation
    • Regisration done with backends
    • Generate mem manager and scheduling
  • Mutualize Meminfo in aidge_core
  • Mutualize functions to generate files in export
  • Refactor Export node
    • Add a dictionnary attributes to stack all the attributes desirable for the export
    • Get recursively attributes for MetaOperator (tracked by #180 (closed))
    • Add function to be agnostic from data form (get_input_channel etc ...)
    • Mutualize export and configuration function, with this change, dev of export only need to inform parameters when creating export_node and no longer to worry about copying kernels etc ...
    • Add function to automatically retrieve Chan, H or W regardless of the dataformat, remove logic from template and adding it in NodeExport instead
  • Change key for selecting an ExportNode (backend + dataformat ...)
  • Update Registration system to use backend and SpecImpl
  • Make SpecImpl Hashable (tracked by: #179)
  • remove producer set to constant trick to distinguish input producer from other producers in the graph
  • Change structure of export to: &12

Other changes:

  • Change type for templated operators (example: Conv -> Conv{NbDims}D) (fix: #168 (closed))
  • Change constructor binding name for these operators (ConvOp{NbDims}D-> Conv{NbDims}DOp)
  • Fix aidge#180 (closed)

Issue to solve

  • When registering a MetaOperator every member should have an implementation Can be bypass by setting dummy implmentations:
@ExportLibAidgeARM.register("Pad2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.any)))
class Pad_ARMCortexM(ExportNodeCpp):
    def __init__(self, node, mem_info, is_input, is_output):
        raise NotImplementedError("Pad2D nodes is not implemented")

Tracked by: #177

  • When creating a new backend, we need to add a "fake" tensor backend:
aidge_core.register_Tensor(["aidge_arm", aidge_core.dtype.float32],
                           aidge_core.get_key_value_Tensor(["cpu", aidge_core.dtype.float32]))

Tracked by: #178

Edited by Cyril Moineau

Merge request reports