Skip to content

Commit fda51a0

Browse files
committed
fix
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 231b180 commit fda51a0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

python/triton/runtime/build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ def quiet():
2020
try:
2121
yield
2222
finally:
23-
print(f"MARK: stdout: {sys.stdout}\n stderr: {sys.stderr}")
23+
stdout_io, stderr_io = sys.stdout, sys.stderr
2424
sys.stdout, sys.stderr = old_stdout, old_stderr
25+
stdout_io.seek(0), stderr_io.seek(0)
26+
print(f"MARK: stdout: '{stdout_io.read()}'\n stderr: '{stderr_io.read()}'")
2527

2628

2729
def _cc_cmd(cc, src, out, include_dirs, library_dirs, libraries):

third_party/intel/backend/driver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,10 @@ def quiet():
568568
try:
569569
yield
570570
finally:
571-
print(f"OUTSIDE BUILD MARK: stdout: {sys.stdout}\n stderr: {sys.stderr}")
571+
stdout_io, stderr_io = sys.stdout, sys.stderr
572572
sys.stdout, sys.stderr = old_stdout, old_stderr
573+
stdout_io.seek(0), stderr_io.seek(0)
574+
print(f"OUTSIDE BUILD MARK: stdout: '{stdout_io.read()}'\n stderr: '{stderr_io.read()}'")
573575

574576

575577
class XPULauncher(object):

0 commit comments

Comments
 (0)