gromero commented on pull request #9229:
URL: https://github.com/apache/tvm/pull/9229#issuecomment-951136485


   > overall looks great. I did a partial pass, will do another later this 
week. Just wanted to provide some early feedbacks.
   > 
   > When I run `-h` after the platform(zephyr,arduino,temolate) I do see error 
message instead of showing the help message:
   > 
   > ```
   > - (microtvm-gTppbK-Q-py3.6) vagrant@microtvm:/home/mhessar/tvm$ tvmc micro 
create-project output_directory  micro_speech.tar zephyr -h
   > usage: tvmc micro create-project PROJECT_DIR MLF zephyr [--list-options] -o
   >                                                         OPTION=VALUE
   >                                                         [OPTION=VALUE ...]
   > tvmc micro create-project PROJECT_DIR MLF zephyr: error: the following 
arguments are required: -o
   > 
   > 
   > 
   > - (microtvm-gTppbK-Q-py3.6) vagrant@microtvm:/home/mhessar/tvm$ tvmc micro 
build  /tmp/mehrdad zephyr -h
   > usage: tvmc micro build PROJECT_DIR zephyr [--list-options] -o OPTION=VALUE
   >                                            [OPTION=VALUE ...]
   > tvmc micro build PROJECT_DIR zephyr: error: the following arguments are 
required: -o
   > 
   > 
   > - (microtvm-gTppbK-Q-py3.6) vagrant@microtvm:/home/mhessar/tvm$ tvmc micro 
flash  /tmp/mehrdad zephyr -h
   > usage: tvmc micro flash PROJECT_DIR zephyr [--list-options] -o OPTION=VALUE
   >                                            [OPTION=VALUE ...]
   > tvmc micro flash PROJECT_DIR zephyr: error: the following arguments are 
required: -o
   > ```
   > 
   > My expectation was to see the options and requirements just like before 
adding platform which was like this:
   > 
   > ```
   > (microtvm-gTppbK-Q-py3.6) vagrant@microtvm:/home/mhessar/tvm$ tvmc micro 
build  /tmp/mehrdad -h
   > usage: tvmc micro build [-h] [-f] PROJECT_DIR {zephyr,arduino,template} ...
   > 
   > positional arguments:
   >   PROJECT_DIR           Project dir to build.
   > 
   > optional arguments:
   >   -h, --help            show this help message and exit
   >   -f, --force           Force rebuild.
   > 
   > platforms:
   >   {zephyr,arduino,template}
   >                         you must selected a platform from the list. You can
   >                         pass '-h' for a selected platform to list its 
options.
   >     zephyr              select Zephyr platform.
   >     arduino             select Arduino platform.
   >     template            select an adhoc template.
   > ```
   > 
   > please let me know what you think.
   
   This is the same behavior we currently have for other `tvmc` commands, like 
`compile` and `run`. Just when only `tvmc` is typed a complete help message is 
displayed:
   
   ```
   gromero@amd:~/git/tvm$ tvmc run
   [17:17:15] /home/gromero/git/tvm/src/target/target_kind.cc:164: Warning: 
Unable to detect CUDA version, default to "-mcpu=sm_20" instead
   [17:17:15] /home/gromero/git/tvm/src/target/target_kind.cc:190: Warning: 
Unable to detect ROCm compute arch, default to "-mcpu=gfx900" instead
   [17:17:15] /home/gromero/git/tvm/src/target/target_kind.cc:204: Warning: 
Unable to detect ROCm version, assuming >= 3.5
   [17:17:15] /home/gromero/git/tvm/src/target/target_kind.cc:164: Warning: 
Unable to detect CUDA version, default to "-mcpu=sm_20" instead
   [17:17:15] /home/gromero/git/tvm/src/target/target_kind.cc:190: Warning: 
Unable to detect ROCm compute arch, default to "-mcpu=gfx900" instead
   [17:17:15] /home/gromero/git/tvm/src/target/target_kind.cc:204: Warning: 
Unable to detect ROCm version, assuming >= 3.5
   usage: tvmc run [-h] [--device {cpu,cuda,cl,metal,vulkan,rocm}] [--fill-mode 
{zeros,ones,random}] [-i INPUTS] [-o OUTPUTS] [--print-time] [--print-top N] 
[--profile] [--repeat N] [--number N]
                   [--rpc-key RPC_KEY] [--rpc-tracker RPC_TRACKER]
                   FILE
   tvmc run: error: the following arguments are required: FILE
   gromero@amd:~/git/tvm$ tvmc 
   [17:17:20] /home/gromero/git/tvm/src/target/target_kind.cc:164: Warning: 
Unable to detect CUDA version, default to "-mcpu=sm_20" instead
   [17:17:20] /home/gromero/git/tvm/src/target/target_kind.cc:190: Warning: 
Unable to detect ROCm compute arch, default to "-mcpu=gfx900" instead
   [17:17:20] /home/gromero/git/tvm/src/target/target_kind.cc:204: Warning: 
Unable to detect ROCm version, assuming >= 3.5
   [17:17:20] /home/gromero/git/tvm/src/target/target_kind.cc:164: Warning: 
Unable to detect CUDA version, default to "-mcpu=sm_20" instead
   [17:17:20] /home/gromero/git/tvm/src/target/target_kind.cc:190: Warning: 
Unable to detect ROCm compute arch, default to "-mcpu=gfx900" instead
   [17:17:20] /home/gromero/git/tvm/src/target/target_kind.cc:204: Warning: 
Unable to detect ROCm version, assuming >= 3.5
   usage: tvmc [-h] [-v] [--version] {tune,compile,run} ...
   
   TVM compiler driver
   
   optional arguments:
     -h, --help          show this help message and exit
     -v, --verbose       increase verbosity
     --version           print the version and exit
   
   commands:
     {tune,compile,run}
       tune              auto-tune a model
       compile           compile a model.
       run               run a compiled module
   
   TVMC - TVM driver command-line interface
   gromero@amd:~/git/tvm$ 
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to