-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][E2E] Use configure_lit_site_cfg in in-tree builds #8854
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
ping, maybe @aelovikov-intel? |
03b7b93
to
576994b
Compare
Thanks for pinging me, this one is great! I've been wondering if that can be achieved but didn't have time post test-suite move to look into it myself. That said, it only works for the non-standalone configuration (when we configure both the compiler/RT and the E2E tests in a single invocation). The standalone configuration used in the CI (both here and a different flavor internally) breaks as can be seen by the failing pre-commit checks in this PR. I think we need to guard the fix with
and use the old code for the |
Also, it might make sense to modify |
576994b
to
cad7849
Compare
Good spot, I had missed that in the CI output. Thank you!
Good idea; done. I was a bit confused by one of the existing lines in the README about whether it was referring to a standalone or non-standalone build. I think it was a mistake in the old readme, but please check my change in case I'm wrong here. |
cad7849
to
66f5dce
Compare
CI Failures: L0 GEN9 Linux - not started, infrastructure problem?
could it be caused by #9013? @smaslov-intel @jandres742 ESIMD: known issue, investigation is being tracked in an internal bug report @intel/llvm-gatekeepers , failures seem unrelated, can we merge this PR? |
@aelovikov-intel : right, please rebase so you incorporate those changes and that error should go away. |
This provides the added benefit that it will automatically map the config paths from the build directories to the corresponding source ones in `llvm-lit`. With this, one should be able to run lit tests directly from source paths. In standalone builds, we don't have access to LLVM's wider configuration, so the old configuration must remain. Note also that this changes the configured cfg file's name from `lit.site.cfg` to `lit.site.cfg.py`, but this aligns us with the predominant style across the llvm project.
66f5dce
to
721a2ad
Compare
Looks like most of the failures have indeed gone away, except for Windows L0 GEN12 |
Unexpectedly Passed Tests (1): |
# Implicitly uses cmake parameters SYCL_BE and SYCL_TARGET_DEVICES, detailed | ||
# below |
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.
It seems it requires specifying them manually, in addition to SYCL_TEST_E2E_TARGETS
above. Maybe worth adding a note somewhere here?
After intel#8854 it's possible to run llvm-lit from anywhere and not be restricted to the end-to-end tests' build directory. However, lit.cfg.py performs auto-detection of some features by creating and compiling small test files. Make sure that those are kept in the build directory no matter where we run llvm-lit from.
…9078) After #8854 it's possible to run llvm-lit from anywhere and not be restricted to the end-to-end tests' build directory. However, lit.cfg.py performs auto-detection of some features by creating and compiling small test files. Make sure that those are kept in the build directory no matter where we run llvm-lit from.
Since intel#9078 (itself a fix for intel#8854), the SYCL E2E lit config would change the working directory and never set it back. This impeded LIT's ability to discover tests and test suites, when tasked with sourcing multiple. For example: llvm-lit sycl/test/A sycl/test/B LIT would discover test 'A' by appending its relative path to the CWD (e.g., root/sycl/test/A) and load up the SYCL E2E lit.cfg. This would change directory into the SYCL build directory. When discovering test 'B' it would append its relative path to the SYCL binary dir and fail to find it (e.g., root/build/tools/sycl/test-e2e/sycl/test/B). This would also have the effect of load the SYCL E2E LIT config a second time, even though it was already loaded. With this change, we maintain the CWD but open the temp files using absolute paths. This allows us to run multiple tests from multiple different paths at the same time, even ones from different suites: llvm-lit sycl/test/A clang/test/B llvm/test/C Running multiple individual SYCL tests on the same command line will also only load the SYCL config the once.
Since #9078 (itself a fix for #8854), the SYCL E2E lit config would change the working directory and never set it back. This impeded LIT's ability to discover tests and test suites, when tasked with sourcing multiple. For example: llvm-lit sycl/test/A sycl/test/B LIT would discover test 'A' by appending its relative path to the CWD (e.g., `root/sycl/test/A`) and load up the SYCL E2E lit.cfg. This would change directory into the SYCL build directory. When discovering test 'B' it would append its relative path to the SYCL binary dir and fail to find it (e.g., `root/build/tools/sycl/test-e2e/sycl/test/B`). This would also have the effect of loading the SYCL E2E LIT config a second time, even though it was already loaded. With this change, we maintain the CWD but open the temp files using absolute paths. This allows us to run multiple tests from multiple different paths at the same time, even ones from different suites: llvm-lit sycl/test/A clang/test/B llvm/test/C Running multiple individual SYCL tests on the same command line will also only load the SYCL config the once.
This provides the added benefit that it will automatically map the config paths from the build directories to the corresponding source ones in
llvm-lit
. With this, one should be able to run lit tests directly from source paths.Note also that this changes the configured cfg file's name from
lit.site.cfg
tolit.site.cfg.py
, but this aligns us with the predominant style across the llvm project.