Skip to content

Commit 321120e

Browse files
authored
Fix test_line_info.py::test_line_info_ir_source (#3961)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 0dba5f8 commit 321120e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/test/unit/language/test_line_info.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import triton
88
import 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", ""])
272272
def 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

Comments
 (0)