Skip to content

Commit

Permalink
[Frontend][ArgParse] Compile with default target(LLVM) when built US…
Browse files Browse the repository at this point in the history
…E_MRVL=ON(apache#17454)

    This is a use-case of invoking TVMC with default target though it is built with MRVL_ON.
    In command line processing, validate_target_args checks if there are add-on options
    derived from the default arguments of codegen/BYOC and it expects that particular codegen
    to be given explicitly in command line. However, certain codegen's can have default target alone,
    in that case codegen optios are not extracted there by relaxing the validation

Signed-off-by: M N Ganesan <[email protected]>
  • Loading branch information
M N Ganesan committed Oct 24, 2024
1 parent 517aa8e commit ae4fcc7
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions python/tvm/driver/tvmc/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,6 @@ def validate_targets(parse_targets, additional_target_options=None):
if additional_target_options is not None:
for target_name in additional_target_options:
if not any([target for target in parse_targets if target["name"] == target_name]):
# When built with USE_MRVL=ON, add-on target options are passed from MRVL codegen's
# config which has pass_default=True and compiled with default target, don't error
# Use case: --target="llvm" cnn.onnx
if (len(tvm_targets) == 1) and (target_name == "mrvl"):
return

first_option = list(additional_target_options[target_name].keys())[0]
raise TVMCException(
f"Passed --target-{target_name}-{first_option}"
Expand Down

0 comments on commit ae4fcc7

Please sign in to comment.