[Attributor] - Cap accesses in AAPointerInfo #1807
Open
bhandarkar-pranav wants to merge 2 commits intoamd-stagingfrom
Open
[Attributor] - Cap accesses in AAPointerInfo #1807bhandarkar-pranav wants to merge 2 commits intoamd-stagingfrom
bhandarkar-pranav wants to merge 2 commits intoamd-stagingfrom
Conversation
Add cl::opt -attributor-max-pi-accesses=<N> (default 0 = unlimited) that
caps the number of accesses in a single AAPointerInfo instance. When
AccessList.size() reaches the threshold in addAccess(), the instance is
set to pessimistic fixpoint.
This prevents O(N²) scaling in LTO builds with many GPU kernels sharing
runtime globals. Global-level AAPointerInfoFloating instances (e.g.,
@TeamState) accumulate direct accesses from all kernels in a partition,
and every query iterates the full list. With N kernels, this creates
O(N) accesses × O(N) queries = O(N²) cost.
On a VASP reproducer (11 patterns, ~160 kernels):
- No cap: 259s link time, 142s in forallInterferingAccesses
- cap=512: 65s link time, 3.4s in forallInterferingAccesses
- cap=128: 54s link time
No behavioral change when the flag is not set (default 0).
Tested: check-llvm (0 failures), check-flang (0 failures),
GPU Fortran correctness suite (0 regressions).
Made-with: Cursor
Collaborator
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.
No description provided.