@@ -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\n valid 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 )
0 commit comments