66
77import triton
88import triton .language as tl
9- from triton ._internal_testing import is_interpreter , is_xpu
9+ from triton ._internal_testing import is_interpreter
1010
1111
1212@triton .jit
@@ -270,9 +270,6 @@ def test_line_info_env(monkeypatch, status: str):
270270
271271@pytest .mark .parametrize ("status" , ["ttir" , "" ])
272272def test_line_info_ir_source (monkeypatch , status , tmp_path ):
273- if is_xpu ():
274- pytest .skip ("KeyError: Unknown key: 'spvbin'" )
275-
276273 try :
277274 obj_kind , command , anchor , separator = get_disassembler_command_and_debug_line_format ()
278275 except BaseException :
@@ -295,7 +292,10 @@ def test_line_info_ir_source(monkeypatch, status, tmp_path):
295292 temp_file = tmp_path / "test.ttir"
296293 temp_file .write_text (src )
297294 kernel_info = triton .compile (str (temp_file ))
298- file_lines = extract_file_lines (command , anchor , separator , kernel_info .asm [obj_kind ])
295+ if obj_kind == "spvbin" :
296+ file_lines = spv_extract_file_lines (kernel_info .asm ["spv" ], command )
297+ else :
298+ file_lines = extract_file_lines (command , anchor , separator , kernel_info .asm [obj_kind ])
299299 if status == "ttir" :
300300 assert check_file_lines (file_lines , "/path/test.py" , 8 , should_contain = False )
301301 assert check_file_lines (file_lines , str (temp_file ), - 1 , should_contain = True )
0 commit comments