Skip to content

Commit

Permalink
fix argument retrieval if subparser is not active
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Stahl authored and PhilippvK committed Jan 23, 2024
1 parent 5e7f442 commit 33562e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/tvm/driver/tvmc/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ def add_compile_parser(subparsers, main_parser, json_params, argv):
disposable_parser = TVMCSuppressedArgumentParser(main_parser)
try:
known_args, _ = disposable_parser.parse_known_args(argv)
_handle_extensions(known_args.experimental_tvm_extension)
except TVMCException:
pass
try:
ext_dirs = known_args.experimental_tvm_extension
except AttributeError:
ext_dirs = []
_handle_extensions(ext_dirs)

parser.add_argument(
"--cross-compiler",
Expand Down

0 comments on commit 33562e7

Please sign in to comment.