-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Switch MLIR to use the internal LIT shell by default #65415
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
Conversation
9f5b004
to
0d0da2c
Compare
This provides better error messages. See https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/
0d0da2c
to
4b18617
Compare
if lit_shell_env: | ||
use_lit_shell = not lit.util.pythonize_bool(lit_shell_env) | ||
|
||
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell) |
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.
This won't honor the CMake config flag, but it'll respect the environment flag allowing to disable it if needed. Seems like the best I can do right now?
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.
What cmake config flag do you mean?
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.
Actually I misremembered, it is controlled by the env var always...
Something to note is that we will still have features.add("shell")
added by lit already here (it's not used in MLIR though)
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.
While I haven't tried, I believe you can just add/remove it in config.available_features
in this lit.cfg.py
... in case someone actually tries to use it one day in MLIR. That's probably for MLIR people to decide.
Thanks for helping us to move away from using external shells in lit. |
@@ -18,18 +18,18 @@ | |||
//-------------------------------------------------------------------------------------------------- | |||
|
|||
// REDEFINE: %{env} = TENSOR0="%mlir_src_dir/test/Integration/data/test.mtx" |
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.
Seems like it would be easier to put the env
command inside the %{env}
substitution.
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.
I hesitated, but it seemed that this was written so that %{env} can be redefined at will (even though no test is actually doing do at the moment)
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.
I don't understand why these tests define and then redefine %{env}
exactly once.
Either way, it works, so it's up to MLIR people to decide how to organize this.
if lit_shell_env: | ||
use_lit_shell = not lit.util.pythonize_bool(lit_shell_env) | ||
|
||
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell) |
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.
What cmake config flag do you mean?
Co-authored-by: Joel E. Denny <jdenny.ornl@gmail.com>
No description provided.