Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cleanup] Log compile errors for AOT tests #10214

Merged
merged 2 commits into from
Mar 2, 2022
Merged

Conversation

driazati
Copy link
Member

@driazati driazati commented Feb 10, 2022

See #10213

Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @driazati, I think it would be great if we could get this in to help debug the recent failures: #10314, #10300

cc @Mousius @manupa-arm @ekalda

Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @driazati , it will make debugging the mysterious CI failures much easier!

tests/python/relay/aot/aot_test_utils.py Show resolved Hide resolved
proc.wait()
if proc.returncode != 0:
raise RuntimeError(
f"Subprocess failed: {cmd}\nstdout:\n{proc.stdout}\nstderr:\n{proc.stderr}"
Copy link
Contributor

@lhutton1 lhutton1 Feb 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last run on CI luckily hit a flaky test, although the Runtime Error doesn't really give many details currently (other than the command that failed):

RuntimeError: Subprocess failed: make -f /workspace/tests/python/relay/aot/corstone300.mk build_dir=/tmp/tmpqlaqvgf3/test/build CFLAGS='-DTVM_RUNTIME_ALLOC_ALIGNMENT_BYTES=8 ' TVM_ROOT=/workspace/tests/python/relay/aot/../../../.. AOT_TEST_ROOT=/workspace/tests/python/relay/aot CODEGEN_ROOT=/tmp/tmpqlaqvgf3/test/codegen STANDALONE_CRT_DIR=/workspace/build/standalone_crt FVP_DIR=/opt/arm/FVP_Corstone_SSE-300/models/Linux64_GCC-6.4/ run
E           stdout:
E           <_io.TextIOWrapper name=7 encoding='utf-8'>
E           stderr:
E           None

I tried to change proc.stdout to something like proc.stdout.read() but this just returns an empty string, presumably because the lines are already read above. There will also be no stderr since this is passed to stdout in the subprocess declaration.

We could make the error visible by adding the contents of the log file to the error message, although I don't think this is very elegant. Any other ideas?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a side channel variable to capture the same info, seems to work locally

driazati and others added 2 commits February 28, 2022 17:17
Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@manupak manupak merged commit 8f6fa8f into apache:main Mar 2, 2022
@manupak
Copy link
Contributor

manupak commented Mar 2, 2022

Thanks @driazati @ekalda @lhutton1 !

Lets see if we can catch what's going on..

pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
* [cleanup] Log compile errors for AOT tests

See apache#10213

* Update tests/python/relay/aot/aot_test_utils.py

* removed the encode of msg that is already str

Co-authored-by: lhutton1 <[email protected]>

Co-authored-by: driazati <[email protected]>
Co-authored-by: Manupa Karunaratne <[email protected]>
Co-authored-by: lhutton1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants