fix gemm segfault
Some checks failed
Validate Operations / config (push) Successful in 1m27s
Validate Operations / build-mlir-cache (push) Successful in 2h0m37s
Validate Operations / validate (push) Failing after 3m41s

print exit signals on validation failure
This commit is contained in:
NiccoloN
2026-03-20 14:00:16 +01:00
parent bb6dcd38a3
commit dbe646ac0d
4 changed files with 52 additions and 5 deletions

View File

@@ -4,6 +4,8 @@ import pty
import selectors
import subprocess
MAX_ERROR_OUTPUT_BYTES = 8192
def _read_chunk(fd, treat_eio_as_eof=False):
try:
@@ -16,6 +18,7 @@ def _read_chunk(fd, treat_eio_as_eof=False):
def _stream_output(fd, process, reporter, treat_eio_as_eof=False):
selector = selectors.DefaultSelector()
recent_output = bytearray()
try:
selector.register(fd, selectors.EVENT_READ)
@@ -31,12 +34,15 @@ def _stream_output(fd, process, reporter, treat_eio_as_eof=False):
reporter._clear()
os.write(1, data)
reporter._render()
recent_output.extend(data)
if len(recent_output) > MAX_ERROR_OUTPUT_BYTES:
del recent_output[:-MAX_ERROR_OUTPUT_BYTES]
finally:
selector.close()
return_code = process.wait()
if return_code != 0:
raise subprocess.CalledProcessError(return_code, process.args)
raise subprocess.CalledProcessError(return_code, process.args, output=bytes(recent_output))
def run_command_with_reporter(cmd, cwd=None, reporter=None):