Skip to content

Commit 53bf11c

Browse files
committed
- whitespace
1 parent 62b9d75 commit 53bf11c

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

python/tvm/target/compilation_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ def make_compilation_config(ctxt, target, target_host=None):
2323
"""Returns a CompilationConfig appropriate for target and target_host, using the same
2424
representation conventions as for the standard build interfaces. Intended only for unit
2525
testing."""
26-
raw_targets=tvm.target.Target.canonicalize_target_and_host(target, target_host)
26+
raw_targets = tvm.target.Target.canonicalize_target_and_host(target, target_host)
2727
return _ffi_api.MakeCompilationConfig(ctxt, raw_targets)

python/tvm/target/target.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def get_arch_version(cpu_ver):
619619
# Check for valid codegen cpu
620620
valid_hex = ["v65", "v66", "v67", "v67t", "v68", "v69"]
621621
try:
622-
cpu_ver = cpu_ver[cpu_ver.index("v"):].lower()
622+
cpu_ver = cpu_ver[cpu_ver.index("v") :].lower()
623623
assert cpu_ver in valid_hex
624624
except:
625625
msg = "{} is not a valid Hexagon version\nvalid versions include {}"
@@ -687,7 +687,7 @@ def validate_hvx_length(codegen_hvx, sim_options):
687687
# If --hvx_length was specified, check HVX length of sim
688688
# vs codegen
689689
i = sim_options.index("hvx_length") + len("hvx_length") + 1
690-
sim_hvx = sim_options[i: i + 3]
690+
sim_hvx = sim_options[i : i + 3]
691691
if sim_hvx != str(codegen_hvx):
692692
msg = "sim hvx {} and codegen hvx {} mismatch!".format(sim_hvx, codegen_hvx)
693693
# Set the stacklevel to the tvm.target.hexagon() call.
@@ -715,9 +715,9 @@ def validate_hvx_length(codegen_hvx, sim_options):
715715

716716
# Regex match for allowed cpus
717717
valid_cpu_str_regex = (
718-
r"(?P<pre>--.*\s)?(--m)?"
719-
+ r"(?P<base_version>v6[25678])(?P<sub_version>[a-z])?"
720-
+ r"(?P<l2_size>_[0-9]+)?(?P<rev>_rev[0-9])?\s?(?P<post>--.*)?"
718+
r"(?P<pre>--.*\s)?(--m)?"
719+
+ r"(?P<base_version>v6[25678])(?P<sub_version>[a-z])?"
720+
+ r"(?P<l2_size>_[0-9]+)?(?P<rev>_rev[0-9])?\s?(?P<post>--.*)?"
721721
)
722722
m = re.match(valid_cpu_str_regex, sim_options.lower())
723723
if not m:
@@ -726,13 +726,13 @@ def validate_hvx_length(codegen_hvx, sim_options):
726726
# Parse options into correct order
727727
cpu_attr = {x: str(m.groupdict()[x] or "") for x in m.groupdict()}
728728
sim_options = (
729-
cpu_attr["base_version"]
730-
+ cpu_attr["sub_version"]
731-
+ cpu_attr["l2_size"]
732-
+ cpu_attr["rev"]
733-
+ " "
734-
+ cpu_attr["pre"]
735-
+ cpu_attr["post"]
729+
cpu_attr["base_version"]
730+
+ cpu_attr["sub_version"]
731+
+ cpu_attr["l2_size"]
732+
+ cpu_attr["rev"]
733+
+ " "
734+
+ cpu_attr["pre"]
735+
+ cpu_attr["post"]
736736
)
737737

738738
return sim_cpu + " " + validate_hvx_length(hvx, sim_options)

tests/python/relay/aot/test_crt_aot_usmp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,4 +642,3 @@ def test_u4_usecase_incompatible_interface_api_errors():
642642
import pytest
643643

644644
sys.exit(pytest.main([__file__] + sys.argv[1:]))
645-

tests/python/relay/test_pass_annotate_spans_defuse.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def test_annotate_spans_compatibility():
4242

4343
# Apply some simple passes to legalize the IR.
4444
with tvm.transform.PassContext(opt_level=0):
45-
module, params = relay.optimize(module, target=tvm.testing.enabled_targets()[0][0], params=params)
45+
module, params = relay.optimize(
46+
module, target=tvm.testing.enabled_targets()[0][0], params=params
47+
)
4648

4749
seq = tvm.transform.Sequential([relay.transform.AnnotateSpans(), relay.transform.DefuseOps()])
4850
with tvm.transform.PassContext(opt_level=3):
@@ -54,4 +56,3 @@ def test_annotate_spans_compatibility():
5456
import pytest
5557

5658
sys.exit(pytest.main([__file__] + sys.argv[1:]))
57-

0 commit comments

Comments
 (0)