Uh oh!
There was an error while loading. Please reload this page.
[TVMC] Allow output module name to be passed as a command line argument - #10962
Conversation
areusch
left a comment
There was a problem hiding this comment.
@grant-arm thanks for this PR, looks great! a few minor comments, could be swayed either way on them (don't take my review as blocking)
| pass_context_configs: Optional[List[str]] = None, | ||
| additional_target_options: Optional[Dict[str, Dict[str, Any]]] = None, | ||
| use_vm: bool = False, | ||
| mod_name: Optional[str] = "default", |
There was a problem hiding this comment.
perhaps "default" should be a constant somewhere?
There was a problem hiding this comment.
Thanks @areusch , I agree it would be good to have "default" as a constant.
It feels like this should be a separate PR though.
Uh oh!
There was an error while loading. Please reload this page.
gromero
left a comment
There was a problem hiding this comment.
@grant-arm LGTM! Thanks for cc:ing me, I just learned about the different ACCEL_TYPES :)
Uh oh!
There was an error while loading. Please reload this page.
681770c to
b6435f1Compare
ekalda
left a comment
There was a problem hiding this comment.
Looks good! :) Got a question about a test...
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* Allows module-name as a command line argument to tvmc * Updates microNPU graph partitioner to pass module name to PartitionGraph() * Updates CMSIS-NN graph partitioner to pass module name to PartitionGraph() Change-Id: I12a4a2eef2ddc7e3c4a6c0dd8fdcab009c975bac
b6435f1 to
061f1eaCompare* main: (527 commits) [hexagon] 'add_hvx' test to explore HVX usage. (apache#10604) [COMMUNITY] @yzh119 -> Reviewer (apache#10993) [Metaschedule] Make custom schedule_rule registration optional (apache#10975) [ONNX] Add imports for BERT contrib operators (apache#10949) sort axes (apache#10985) [Hexagon] Remove HexagonBuffer external constructor and support (apache#10978) [CI] Update GPU image (apache#10992) [Runtime][Vulkan] Add RGP support to TVM for vulkan device (apache#10953) [FIX] resolve int64/32 for AttrStmtNode (apache#10983) [TVMC] Allow output module name to be passed as a command line argument (apache#10962) [ONNX] Add MatMulInteger importer (apache#10450) [COMMUNITY] @guberti -> Reviewer (apache#10976) Support `qnn.conv2d` in FoldExplicitPading (apache#10982) change Hexagon docker version (apache#10981) remove exception handling of autotvm xgboost extract functions (apache#10948) [CUDNN] Add partitioning support for conv2d and log_softmax (apache#10961) [Hexagon][LLVM] Enable/test tensorized Hexagon DMA on 2d transformed layout (apache#10905) [Hexagon] Move aot/graph_executor interactions into launcher (apache#10907) [HEXAGON] Split huge 1D DMA Transfers into smaller transfers with legal sizes. (apache#10971) [CI][DOCKER] Add pytest-lazy-fixture to images (apache#10970) ...
…nt (apache#10962) * Allows module-name as a command line argument to tvmc * Updates microNPU graph partitioner to pass module name to PartitionGraph() * Updates CMSIS-NN graph partitioner to pass module name to PartitionGraph() Change-Id: I12a4a2eef2ddc7e3c4a6c0dd8fdcab009c975bac
Currently there is no way to pass an output module name to tvmc on the command line when compiling a model.
This means that (for the use cases we are interested in) generated C code is always placed in files named
default_lib*.cand that functions are namedtvmgen_default*().If we want to compile multiple models for use with a single application, the C source file names and function names are not unique, resulting in failure when building the generated C code.
This PR allows module-name to be passed to tvmc on the command line, for example:
In this case, the generated C code is placed in files named
classify_lib*.cand functions are namedtvmgen_classify*().Additionally, this PR updates the microNPU and CMSIS-NN graph partitioners to pass the module name to PartitionGraph().
This is necessary to ensure that the C code function names generated for microNPU and CMSIS-NN include the module name and not
default.@leandron@Mousius@manupa-arm@areusch
cc @gromero