Fix: disambiguate paged attention event casts#847
Open
puddingfjz wants to merge 1 commit into
Open
Conversation
Use explicit global event_t casts in paged attention AIC kernels so A5 onboard builds do not confuse CANN event_t with pto::event_t.
There was a problem hiding this comment.
Code Review
This pull request replaces C-style casts with static_cast<::event_t> in several aic_pv_matmul.cpp files across examples and tests. These changes affect the wait_flag and set_flag calls within the pv_matmul_n_impl function, promoting better C++ practices and type safety. I have no feedback to provide as there were no review comments to evaluate.
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.
Summary
Fix A5 onboard compilation failures in paged-attention AIC kernels by replacing
ambiguous C-style event_t casts with explicit global event_t casts.
A5's onboard toolchain sees both CANN's global event_t and PTO-ISA's
pto::event_t, so a C-style event_t cast can fail name lookup with:
Scope
Validation
rg "\(event_t\)" examples tests src pythonhas no remaining matches.clang-format --dry-run --Werrorpassed on all touched files.git diff --cached --checkpassed before commit.This was exposed by
st-onboard-a5in PR #839, specifically: