-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[DEBUG] Only print out diagnostic messages if an environment variable is set #3147
Conversation
This prevents crashes in test_core.py due to too many diagnostics emitted in llvm/llvm-project#78228 It should also speed up compile times, as we can use multithreading, and avoid handling diagnostic messages.
e20e571
to
0aa6b95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
… is set (#3147) This prevents crashes in test_core.py due to too many diagnostics emitted in llvm/llvm-project#78228 It should also speed up compile times, as we can use multithreading, and avoid handling diagnostic messages.
After some debugging on our side, I am not sure that this patch does what was intended.
Therefore the only effect this patch seems to have is enabling multithreading unless you set the new envvar. We are happy that the diagnostics are the same with and without this patch, at least in the way we use Triton. If you want to make a patch to actually print fewer diags, that should probably be disabled by default, and you can enable it on your side. |
Thanks for looking into it. That's quite interesting, I just double checked if I missed the printouts in our output after the patch, and I can clearly see them before it, and they disappeared afterwards. I see two possibilities why that happened: either it's because we are using a newer version of LLVM, and the default MLIR behavior changed (you could try patching in #3150 to try it out), or it has something to do with how the pytest runner works (it's a bit of a mystery to me TBH) - e.g., maybe enabling multithreading again somehow prevents the crash, and pytest only prints out stdout / stderr if the test fails. |
According to the latest comments in #3150 it seems that this is doing something even upstream with a newer version of LLVM. |
… is set (triton-lang#3147) This prevents crashes in test_core.py due to too many diagnostics emitted in llvm/llvm-project#78228 It should also speed up compile times, as we can use multithreading, and avoid handling diagnostic messages.
This prevents crashes in test_core.py due to too many diagnostics emitted in llvm/llvm-project#78228 It should also speed up compile times, as we can use multithreading, and avoid handling diagnostic messages.