- Notifications
You must be signed in to change notification settings - Fork70
Split ir nodes into multiple translation units#5596
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 ourterms of service andprivacy 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
wujingyue commentedNov 27, 2025
- split monolithic csrc/ir/nodes.cpp into internal_nodes.cpp and internal_base_nodes.cpp matching header declarations
- cleaned includes with IWYU-style reductions and added required CUDA/runtime headers where needed
- updated build and verified via _bn
Description
|
| Relevant files | |||||
|---|---|---|---|---|---|
| Enhancement |
| ||||
| Configuration changes |
|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 PR contains tests |
| 🔒 Security concerns No - This is a code reorganization with no functional changes. |
| ⚡ Recommended focus areas for review |
Include Dependencies |
Greptile OverviewGreptile SummaryRefactored monolithic Key improvements:
The split aligns with the documented IR hierarchy and should improve build times through better dependency isolation and parallel compilation. Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram participant Build as Build System participant Old as nodes.cpp<br/>(6531 lines) participant New1 as internal_base_nodes.cpp<br/>(1720 lines) participant New2 as internal_nodes.cpp<br/>(4846 lines) participant Headers as Header Files Note over Old: Original monolithic file Note over Old,Headers: Split based on header structure Old->>New1: Extract IterDomain implementations Old->>New1: Extract TensorDomain implementations Note over New1: Base node types<br/>Reduced includes Old->>New2: Extract FullOp, SelectOp, etc. Old->>New2: Extract remaining IR nodes Note over New2: Higher-level ops<br/>CUDA/ATen includes Headers->>New1: #include internal_base_nodes.h Headers->>New2: #include internal_nodes.h New1->>Build: Register translation unit New2->>Build: Register translation unit Build->>Build: Remove old nodes.cpp Build->>Build: Add internal_base_nodes.cpp Build->>Build: Add internal_nodes.cpp |
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.
3 files reviewed, no comments
wujingyue commentedNov 27, 2025
!test |