Conversation
|
Review updated until commit 5874b2b Description
|
| Relevant files | |||||||
|---|---|---|---|---|---|---|---|
| Bug fix |
|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 No relevant tests |
| ⚡ Recommended focus areas for review |
Possible Issue
|
|
!test |
|
!test |
|
!test |
Greptile OverviewGreptile SummaryThis PR fixes contiguity computation for tensor allocation domains by replacing a two-phase approach with a single-pass dual-index algorithm that correctly handles reduction and broadcast dimensions. Key changes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant FKR as FusionKernelRuntime
participant AM as ArgumentManager
participant RAD as resetAllocationDomainAndContiguity
participant IAS as inferAllocationSizesAndStrides
participant TV as TensorView
FKR->>AM: updateWithSegmentOutputs(outputs, runtime_outputs, id, false)
Note over FKR,AM: Changed from true to false
AM->>AM: Store outputs in tensor_map_
alt update_contiguity == true
loop For each TensorView output
AM->>RAD: resetAllocationDomainAndContiguity(tv, tensor)
RAD->>IAS: inferAllocationSizesAndStrides(tensor, tv)
IAS->>IAS: Traverse logical to allocation domain
IAS->>IAS: Validate all IDs present in active_ids
Note over IAS: Now enforces strict validation
IAS-->>RAD: Return (sizes, strides) without reductions
RAD->>RAD: Iterate allocation domain right-to-left
RAD->>RAD: Dual-index traversal (alloc_idx, sizes_idx)
Note over RAD: Skip reductions (no sizes/strides entry)<br/>Skip broadcasts (nullopt contiguity)<br/>Compute contiguity for normal dims
RAD->>TV: setContiguity(contiguity)
end
end
AM->>AM: Clean up unused tensor_map_ entries
|
|
|
||
| args_manager.updateWithSegmentOutputs( | ||
| group_to_run->outputs(), group_runtime_outputs, run_order_id, true); | ||
| group_to_run->outputs(), group_runtime_outputs, run_order_id, false); |
There was a problem hiding this comment.
style: Check whether changing this flag from true to false is intentional and related to the contiguity computation fix, as it's not explained in the PR description.
No description provided.