Skip to content

Commit 9b4bbf1

Browse files
committed
Take commit 1883703 from upstream triton
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 85685a8 commit 9b4bbf1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

python/test/unit/language/test_compile_errors.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import triton.language as tl
88
from triton.compiler.errors import CompilationError, CompileTimeAssertionFailure
99
import traceback
10-
import platform
1110

1211

1312
def is_interpreter():
@@ -155,8 +154,8 @@ def kernel():
155154
try:
156155
inner = e.value.__cause__
157156
outer = e.value
158-
target = "\\core.py" if platform.system() == 'Windows' else "/core.py"
159-
assert target in '\n'.join(traceback.format_tb(inner.__traceback__)), "error should point inside core.py"
157+
assert f"{os.sep}core.py" in '\n'.join(traceback.format_tb(
158+
inner.__traceback__)), "error should point inside core.py"
160159

161160
assert "at 2:4:" in str(outer), "error should point to expand_dims call"
162161
assert "<source unavailable>" not in str(outer)

python/test/unit/language/test_subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_print(func_type: str, data_type: str, device: str):
5353
assert proc.stderr == b''
5454
return
5555

56-
outs = [line for line in proc.stdout.decode("UTF-8").replace('\r', '').split("\n") if line]
56+
outs = [line for line in proc.stdout.decode("UTF-8").splitlines() if line]
5757
# The total number of elements in the 1-D tensor to print.
5858
N = 128
5959

0 commit comments

Comments
 (0)