-
Notifications
You must be signed in to change notification settings - Fork 74
don't use tma when iter and bcast domains are merged #5735
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
base: main
Are you sure you want to change the base?
Conversation
|
!test |
Description
|
| Relevant files | |||
|---|---|---|---|
| Bug_fix |
| ||
| Tests |
|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 PR contains tests |
| ⚡ Recommended focus areas for review |
TMA Broadcast Detection
|
Greptile SummaryPrevented TMA (Tensor Memory Accelerator) usage for tensors with broadcast dimensions by adding an early validation check in
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Scheduler as Pointwise Scheduler
participant Heuristics as getPointwiseHeuristics
participant Check as isTvSuitableForTma
participant Validation as TMA Validation
Scheduler->>Heuristics: Request TMA heuristics
Heuristics->>Heuristics: Determine break point
Note over Heuristics,Check: NEW: Early validation
Heuristics->>Check: Check each input tensor
Check->>Check: Scan logical domain for broadcast
alt Has broadcast dimensions
Check-->>Heuristics: return false (not suitable)
Heuristics-->>Scheduler: return nullptr (disable TMA)
else No broadcast dimensions
Check-->>Heuristics: return true (suitable)
Heuristics->>Heuristics: Calculate bits_per_element
alt bits_per_element == 0
Heuristics-->>Scheduler: return nullptr (no suitable inputs)
else bits_per_element > 0
Heuristics->>Heuristics: Compute TMA domain dimensions
Heuristics->>Heuristics: Configure tile sizes
Heuristics-->>Scheduler: return TMA params
Scheduler->>Validation: Lower with TMA
Validation->>Validation: Validate TMA domain == allocation domain
Note over Validation: No merge errors (broadcast rejected early)
end
end
|
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.
2 files reviewed, 1 comment
| if (bits_per_element == 0) { | ||
| return nullptr; | ||
| } |
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.
style: redundant check - bits_per_element == 0 is already checked at line 125-127, so this condition will never be true
| if (bits_per_element == 0) { | |
| return nullptr; | |
| } | |
| // bits_per_element already validated at line 125-127 |
No description provided.