Skip to content

Commit 182d16f

Browse files
authored
[CI] Fix debug_str() to be compatible with latest PyTorch nightly (#1050)
1 parent 5be73dd commit 182d16f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

helion/_compiler/device_ir.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ def __str__(self) -> str:
300300

301301
def debug_str(self) -> str:
302302
result = str(self)
303-
return re.sub(r" ?(# File:\s+).*/([^/:]+:\d+)", r"\1.../\2", result)
303+
# Normalize indentation to 4 spaces to handle both PyTorch 2.9 and nightly formatting
304+
return re.sub(r" *(# File:\s+).*/([^/:]+:\d+)", r" \1.../\2", result)
304305

305306
def add_graph(
306307
self,

0 commit comments

Comments
 (0)