Repository navigation
[libclc] Fix ctest failures after 7f3661128b1e: adjust external check and make shuffle helpers static - #160036
Merged
Conversation
wenju-he
commented
Sep 22, 2025
Contributor
- Replace call-site check with external declaration scan (grep declare) to avoid false positives for not-inlined _clc* functions.
- _clc_get_el* helpers are defined as inline in clc_shuffle2.cl, so they have available_externally attribute. When they fail to inline they are deleted by EliminateAvailableExternallyPass and become unresolved in cedar-r600--.bc. Mark them static to resolve the issue.
…make shuffle helpers static * Replace call-site check with external declaration scan (grep declare) to avoid false positives for not-inlined __clc_* functions. * _clc_get_el* helpers are defined as inline in clc_shuffle2.cl, so they have available_externally attribute. When they fail to inline they are deleted by EliminateAvailableExternallyPass and become unresolved in cedar-r600--.bc. Mark them static to resolve the issue.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes ctest failures that occurred after commit 7f36611 by addressing two distinct issues: false positives in external function checking and unresolved function symbols in compiled bytecode.
- Replaces call-site checking with external declaration scanning to avoid false positives
- Changes shuffle helper functions from inline to static to prevent elimination during optimization
- Updates test names and error messages to reflect the new checking approach
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| libclc/cmake/modules/AddLibclc.cmake | Updates test name and script reference from "external-calls" to "external-funcs" |
| libclc/clc/lib/generic/misc/clc_shuffle2.cl | Changes _CLC_INLINE to static for shuffle helper functions |
| libclc/clc/lib/generic/misc/clc_shuffle.cl | Changes _CLC_INLINE to static for shuffle helper functions |
| libclc/check_external_funcs.sh | Modifies check logic from call sites to external declarations and updates error messages |
Comment on lines
+505
to
+507
| # Add a test for whether or not the libraries contain unresolved functions | ||
| # which would usually indicate a build problem. Note that we don't perform | ||
| # this test for all libclc targets: |
There was a problem hiding this comment.
The comment update should mention that the change from 'calls' to 'functions' reflects a shift from checking call sites to checking external declarations, which provides more accurate detection of unresolved symbols.
Suggested change
| # Add a test for whether or not the libraries contain unresolved functions | |
| # which would usually indicate a build problem. Note that we don't perform | |
| # this test for all libclc targets: | |
| # Add a test for whether or not the libraries contain unresolved functions, | |
| # which would usually indicate a build problem. This test now checks for | |
| # unresolved external function declarations (rather than call sites), reflecting | |
| # a shift from checking 'calls' to checking 'functions' for more accurate | |
| # detection of unresolved symbols. Note that we don't perform this test for all | |
| # libclc targets: |
Co-authored-by: Copilot <[email protected]>
arsenm
approved these changes
Sep 22, 2025
Member
|
Thank you. I can confirm that they seem good now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.