You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed unnecessary header includes from csrc/scheduler/utils.h by replacing ir/all_nodes.h and ir/cloner.h with the more specific ir/interface_nodes.h.
Analysis:
ir/all_nodes.h is a convenience header that transitively includes many IR node types (base_nodes.h, composite_nodes.h, interface_nodes.h, internal_base_nodes.h, internal_nodes.h, kernel_ir.h)
ir/cloner.h provides the IrCloner class, which is not used in utils.h
csrc/scheduler/utils.h only needs TensorView, IterDomain, and Fusion declarations, which are available through ir/interface_nodes.h
Impact:
Reduces compilation dependencies and speeds up incremental builds
Follows best practice of including only necessary headers
No functional changes to the API
Confidence Score: 5/5
This PR is safe to merge with no risk
The change is a straightforward header cleanup that reduces unnecessary includes. The header file csrc/scheduler/utils.h only uses pointer declarations and forward declarations, so ir/interface_nodes.h provides all necessary types. The removed headers (ir/all_nodes.h and ir/cloner.h) were bringing in unnecessary transitive dependencies. This is a build hygiene improvement with no functional changes.
No files require special attention
Important Files Changed
Filename
Overview
csrc/scheduler/utils.h
replaced ir/all_nodes.h and ir/cloner.h with ir/interface_nodes.h, reducing unnecessary includes
Sequence Diagram
sequenceDiagram
participant SU as csrc/scheduler/utils.h
participant AN as ir/all_nodes.h (removed)
participant CL as ir/cloner.h (removed)
participant IN as ir/interface_nodes.h (added)
participant BN as ir/base_nodes.h
participant CN as ir/composite_nodes.h
participant IBN as ir/internal_base_nodes.h
participant INO as ir/internal_nodes.h
participant KIR as kernel_ir.h
Note over SU,IN: Before: utils.h included all_nodes.h + cloner.h
SU->>AN: #include "ir/all_nodes.h"
AN->>BN: includes base_nodes.h
AN->>CN: includes composite_nodes.h
AN->>IN: includes interface_nodes.h
AN->>IBN: includes internal_base_nodes.h
AN->>INO: includes internal_nodes.h
AN->>KIR: includes kernel_ir.h
SU->>CL: #include "ir/cloner.h"
CL-->>SU: IrCloner definitions (unused)
Note over SU,IN: After: utils.h only includes interface_nodes.h
SU->>IN: #include "ir/interface_nodes.h"
IN->>IBN: includes internal_base_nodes.h
IN->>INO: includes internal_nodes.h
Note over SU,IN: Reduced transitive includes:<br/>no base_nodes, composite_nodes, kernel_ir, cloner
The PR replaces two headers ("ir/all_nodes.h" and "ir/cloner.h") with "ir/interface_nodes.h". Need to verify that the new header provides all necessary functionality that was previously available through the removed headers. This should be validated by ensuring the code compiles successfully and all existing functionality in scheduler/utils.h continues to work as expected.
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
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.