-
Notifications
You must be signed in to change notification settings - Fork 74
Enable TensorIndexer with the stream tests #5726
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
Conversation
Loop index fix
|
!test --diff |
|
Review updated until commit 2195bf9 Description
|
| Relevant files | |||
|---|---|---|---|
| Bug fix |
| ||
| Enhancement |
|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 PR contains tests |
| ⚡ Recommended focus areas for review |
Loop Index Logic
ptype == ParallelType::Stream alongside isParallelTypeThread(ptype). This change ensures stream parallel loops get proper loop indices via NamedScalar::getParallelIndex(ptype). Verify this logic is correct and doesn't break existing thread parallel loop behavior. |
Greptile SummaryThis PR enables Key Changes:
The fix ensures that stream parallel loops correctly get assigned Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Test as StreamTest
participant Fusion as Fusion/KernelExecutor
participant IdModel as IdModel::allocateLoopIndexVariables
participant NamedScalar as NamedScalar::getParallelIndex
Test->>Test: Constructor: Enable IdModel option
Test->>Fusion: Create fusion with Stream parallelization
Fusion->>IdModel: Allocate loop index variables
IdModel->>IdModel: Check parallel type of loop group
alt isParallelTypeThread(ptype)
IdModel->>NamedScalar: getParallelIndex(ptype)
NamedScalar-->>IdModel: Return thread index (e.g., threadIdx.x)
else ptype == ParallelType::Stream
IdModel->>NamedScalar: getParallelIndex(ParallelType::Stream)
NamedScalar-->>IdModel: Return streamIdx
end
IdModel-->>Fusion: Loop index variable assigned
Fusion->>Fusion: Compile and execute with Stream index
|
|
!test |
Also fixes a loop index setting for stream parallel loops