Skip to content

Commit ef72c31

Browse files
authored
[Tests] Improve regex for test_compile_only_dot (#7602)
After #7521 this test could fail when TRITON_DISABLE_LINE_INFO=0 The CI sets TRITON_DISABLE_LINE_INFO=1 so variable names wouldn't be generated and the test would pass just with the \d+ regex. An example is this: ``` ; this one is ok %14 = tt.load %9 : tensor<64x64x!tt.ptr<f16>, #blocked1> loc(#loc9) ; with variable name regex fails %a = tt.load %a_ptr_9 : tensor<64x64x!tt.ptr<f16>, #blocked1> loc(#loc26) ``` Other tests seem to be already using \w so they are ok.
1 parent a7a89c7 commit ef72c31

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/test/unit/language/test_compile_only.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ def simple_dot(a_base, b_base, out):
3838
triton.compiler.ASTSource(fn=simple_dot, signature={"a_base": "*fp16", "b_base": "*fp16", "out": "*fp16"},
3939
constexprs={}), target=GPUTarget("cuda", 100, 32))
4040
ttgir = k.asm["ttgir"]
41-
pattern = (r"%(?P<A>\d+) = tt\.load"
41+
pattern = (r"%(?P<A>\w+) = tt\.load"
4242
r"(.|\n)*?"
43-
r"%(?P<A_SHMEM>\d+) = ttg\.local_alloc %(?P=A)"
43+
r"%(?P<A_SHMEM>\w+) = ttg\.local_alloc %(?P=A)"
4444
r"(.|\n)*?"
45-
r"%(?P<B>\d+) = tt\.load"
45+
r"%(?P<B>\w+) = tt\.load"
4646
r"(.|\n)*?"
47-
r"%(?P<B_SHMEM>\d+) = ttg\.local_alloc %(?P=B)"
47+
r"%(?P<B_SHMEM>\w+) = ttg\.local_alloc %(?P=B)"
4848
r"(.|\n)*?"
4949
r"%(?P<TMEM_BASE>\w+) = ttng\.tmem_alloc"
5050
r"(.|\n)*?"

0 commit comments

Comments
 (0)