Skip to content

Commit 3b5e403

Browse files
authored
Merge pull request #1132 from jiezzhang/jiezzhang/fix_vector_swizzles_batching
Register vector_swizzles tests with batch index
2 parents f0302fc + 33d72e4 commit 3b5e403

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/common/common_python_vec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,15 +744,15 @@ def gen_swizzle_test(type_str, convert_type_str, as_type_str, size, num_batches,
744744
return string
745745

746746

747-
def write_swizzle_source_file(swizzles, input_file, output_file, type_str):
747+
def write_swizzle_source_file(swizzles, input_file, output_file, type_str, batch_index):
748748

749749
with open(input_file, 'r') as source_file:
750750
source = source_file.read()
751751

752752
source = replace_ifbyte_strings(source, type_str)
753753

754754
source = replace_string_in_source_string(source,
755-
remove_namespaces_whitespaces(type_str),
755+
"{}_{}".format(remove_namespaces_whitespaces(type_str), batch_index),
756756
'$TYPE_NAME')
757757

758758
source = replace_string_in_source_string(source, swizzles[0],
@@ -813,4 +813,4 @@ def make_swizzles_tests(type_str, input_file, output_file, num_batches, batch_in
813813
as_type_str, 8, num_batches, batch_index)
814814
swizzles[5] = gen_swizzle_test(type_str, convert_type_str,
815815
as_type_str, 16, num_batches, batch_index)
816-
write_swizzle_source_file(swizzles, input_file, output_file, type_str)
816+
write_swizzle_source_file(swizzles, input_file, output_file, type_str, batch_index)

0 commit comments

Comments
 (0)