Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/tvm/driver/tvmc/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _generate_codegen_args(parser, codegen_name):
target_group.add_argument(
f"--target-{codegen_name}-{target_option}",
type=python_type,
help=f"target {codegen_name} {target_option}{python_type}",
help=field.description,
)


Expand Down
23 changes: 23 additions & 0 deletions tests/python/driver/tvmc/test_target_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,29 @@ def test_mapping_target_args():
assert reconstruct_target_args(parsed) == {"llvm": {"mcpu": "cortex-m3"}}


@tvm.testing.requires_vitis_ai
def test_composite_target_cmd_line_help():
parser = argparse.ArgumentParser()
generate_target_args(parser)
assert parser._option_string_actions["--target-vitis-ai-dpu"].help == "Vitis AI DPU identifier"
assert (
parser._option_string_actions["--target-vitis-ai-build_dir"].help
== "Build directory to be used (optional, debug)"
)
assert (
parser._option_string_actions["--target-vitis-ai-work_dir"].help
== "Work directory to be used (optional, debug)"
)
assert (
parser._option_string_actions["--target-vitis-ai-export_runtime_module"].help
== "Export the Vitis AI runtime module to this file"
)
assert (
parser._option_string_actions["--target-vitis-ai-load_runtime_module"].help
== "Load the Vitis AI runtime module to this file"
)


@tvm.testing.requires_cmsisnn
def test_include_known_codegen():
parser = argparse.ArgumentParser()
Expand Down