-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Problem: AHA regressions show log information out of order. I.e. in regress.py we see the following code
print(f"--- Running regression: {args.config}")
...
generate_sparse_bitstreams(sparse_tests, width, height)
However, in the log output, sparse_bitstream info comes out before we see the Running regression tag:
% docker exec $container /bin/bash -c "aha regress pr" >& log
% egrep '(BASE|Running)' regress.log
TEST BASE NAME: matmul_ijk
TEST BASE NAME: mat_mattransmul
...
--- Running regression: pr
An example can of this behavior can be seen in the Aha regressions step of the buildkite log at https://buildkite.com/stanford-aha/garnet/builds/4660
Why: sparse_bitstream log info comes out on stderr, whereas the print("Running regression") goes to stdout. Until the stdout buffer reaches minimum capacity (e.g. 1024 characters), it does not get written out to the terminal screen. Meanwhile, stderr continues to spew.
Solution: Periodically flush stdout so that output appears in a more timely manner.
I have a fix that I will submit once the tapeout panic is over.