Skip to content

Commit

Permalink
[Frontend][ArgParse] Compile with default(LLVM) target and build wit…
Browse files Browse the repository at this point in the history
…h BYOC(apache#17454)

    It is a unique use-case to check the default target(LLVM), though TVM is built with BYOC(MRVL-ON)
    The config of Codegen(BYOC) contains default values for configuration/optons, it is extracted
    during _generate_codegen_args. In command line processing, validate_target_args checks if there are
    add-on options and it expects that particular target to be given explicitly in command line.
    Here, it is test for default (LLVM) path only, hence validate_target_args need to ignore the
    codegen's configuration

Signed-off-by: M N Ganesan <[email protected]>
  • Loading branch information
M N Ganesan committed Oct 11, 2024
1 parent 4a86250 commit aba2866
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/tvm/driver/tvmc/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ def validate_targets(parse_targets, additional_target_options=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, Eg: --target="llvm" cnn.onnx
if (len(tvm_targets) == 1) and (target_name == 'mrvl'):
# 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]
Expand Down

0 comments on commit aba2866

Please sign in to comment.