Skip to content

Conversation

@ldrumm
Copy link
Contributor

@ldrumm ldrumm commented Jul 31, 2024

Running the check-sycl-dumps target sets the SYCL_LIB_DUMPS_ONLY param for lit which should only enable the ABI dump tests. However, since 1fde656 we've added a non lit.formats.ShTest() which doesn't respect config.suffixes, so we need to account for this.

@ldrumm ldrumm requested a review from a team as a code owner July 31, 2024 17:47
@ldrumm ldrumm requested a review from dm-vodopyanov July 31, 2024 17:47
@ldrumm
Copy link
Contributor Author

ldrumm commented Jul 31, 2024

An alternative to this is to teach the standalone header format about suffixes:

diff --git a/sycl/test/format.py b/sycl/test/format.py
index 19d16a263426..b64f41844222 100644
--- a/sycl/test/format.py
+++ b/sycl/test/format.py
@@ -23,6 +23,8 @@ class SYCLHeadersTest(lit.formats.TestFormat):
             for filename in filenames:
                 if not filename.endswith(".hpp"):
                     continue
+                if os.path.splitext(filename)[1] not in litConfig.suffixes:
+                    continue
                 filepath = os.path.join(dirpath, filename)

                 if headers_filter is not None:

Running the check-sycl-dumps target sets the SYCL_LIB_DUMPS_ONLY param
for lit which should only enable the ABI dump tests.
However, since 1fde656 we've added a non `lit.formats.ShTest()`
which doesn't respect config.suffixes, so we need to account for this.
@ldrumm ldrumm force-pushed the SYCL_LIB_DUMPS_ONLY branch from 0d382af to 1d5a436 Compare July 31, 2024 17:54
@ldrumm ldrumm temporarily deployed to WindowsCILock July 31, 2024 17:57 — with GitHub Actions Inactive
@ldrumm ldrumm temporarily deployed to WindowsCILock July 31, 2024 20:49 — with GitHub Actions Inactive
@AlexeySachkov
Copy link
Contributor

An alternative to this is to teach the standalone header format about suffixes:

This might actually be a better approach, because instead of introducing a custom logic for skipping certain tests, it would mean that tests won't launch themselves thanks to existing/standard/built-in mechanism of filters. The latter is a cleaner design, I think

@ldrumm
Copy link
Contributor Author

ldrumm commented Aug 1, 2024 via email

@ldrumm ldrumm temporarily deployed to WindowsCILock August 1, 2024 11:50 — with GitHub Actions Inactive
Copy link
Contributor

@AlexeySachkov AlexeySachkov left a comment

Choose a reason for hiding this comment

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

Thanks!

@dm-vodopyanov
Copy link
Contributor

@AlexeySachkov AlexeySachkov changed the title Make testsuite respect SYCL_LIB_DUMPS_ONLY [SYCL][Test] Make testsuite respect SYCL_LIB_DUMPS_ONLY Aug 6, 2024
@AlexeySachkov
Copy link
Contributor

@ldrumm
Copy link
Contributor Author

ldrumm commented Aug 6, 2024

@ldrumm, please add a tag.
https://github.com/intel/llvm/blob/sycl/sycl/doc/developer/ContributeToDPCPP.md#commit-message

Done :)

Thanks Alexey.
As a sidenote: is the file list in the diffstat not enough? These tags seem to eat up a large proportion of the 50 character title and seem to make for worse descriptions in general

@dm-vodopyanov
Copy link
Contributor

@ldrumm, please add a tag.
https://github.com/intel/llvm/blob/sycl/sycl/doc/developer/ContributeToDPCPP.md#commit-message

Done :)

Thanks Alexey. As a sidenote: is the file list in the diffstat not enough? These tags seem to eat up a large proportion of the 50 character title and seem to make for worse descriptions in general

We use these tags at least for creating release notes. @bader can provide more reasons if any.

@bader
Copy link
Contributor

bader commented Aug 12, 2024

The original idea is these patches are supposed to be upstreamed to llvm/llvm-project repository. In order to do that we are trying to follow LLVM's guidelines and policies. This requirement is specified in https://llvm.org/docs/DeveloperPolicy.html#commit-messages.

@ldrumm
Copy link
Contributor Author

ldrumm commented Aug 22, 2024

CUDA failures seem down to device detection unrelated to this patch

@intel/llvm-gatekeepers please merge

@ldrumm ldrumm merged commit de43757 into intel:sycl Aug 22, 2024
@ldrumm
Copy link
Contributor Author

ldrumm commented Aug 22, 2024

CUDA failures seem down to device detection unrelated to this patch

@intel/llvm-gatekeepers please merge

sure thing ;)

@ldrumm ldrumm deleted the SYCL_LIB_DUMPS_ONLY branch August 22, 2024 15:21
for filename in filenames:
if not filename.endswith(".hpp"):
suffix = os.path.splitext(filename)[1]
if suffix not in SUFFIXES or suffix not in litConfig.suffixes:
Copy link
Contributor

Choose a reason for hiding this comment

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

@ldrumm, I've just realized that this patch had completely disable the testing suite :)

We don't have .hpp registered as a suffix and therefore we always skip all those tests. This is more of a FYI, I'm working on a revamp/expansion of the suite in scope of #16012, so I will fix it as part of that effort

Copy link
Contributor

Choose a reason for hiding this comment

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

Addressed this in #16117

AlexeySachkov added a commit that referenced this pull request Nov 21, 2024
We have a suite to check that every header contains enough `#include`
directives and forward declarations so that it can be included
standalone and used. However, that suite got accidentally disabled some
time ago in #14879

This PR re-enabled the suite and fixed all issues it detected.

Besides that, the suite is upgraded:
- it now scans source directory, meaning that it won't complain about
headers which were removed from the codebase, but left in build folder
- it is now possible to have add a custom test instead of auto-generated
one: this is useful when you want to trigger certain template
instantiations to make sure that all code paths are covered
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