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
We're kicking off a systematic effort to dramatically reduce CK and CK-Tile build times, starting with an intensive three-week research and hackathon-style phase, followed by a sustained multi-month effort.
Why
Current builds take hours, slowing iteration, CI, and developer productivity. Faster build times will be great for users, and kernels that compile in seconds enable more interactive work.
Strategy
Systematic approach:
Profile builds thoroughly and measure impact of changes.
Use data-driven prioritization to focus on high-value improvements.
Document and test the core meta-programming logic in CK and CK Tile.
Three strategies for code changes:
Rewrite metaprogramming using best practices for C++17, e.g. replace math algorithms implemented with recursive template instantiation with algorithms in consteval functions..
Remove cruft and unused or obsolete kernel code.
Simplify code, e.g. by pruning the include dependency trees and reduce duplication, to lighten compiler load.
Complementary approaches
Bottom-up complexity analysis of compile-time operations.
Add unit tests for metaprogramming primitives to enable safe refactoring.
AI-assisted detection of compile-time inefficiencies.
Success Criteria
Build times significantly reduced.
Evidence-based improvements tracked over time.
Processes in place for sustained monitoring and improvement of build times.
This week we identified several build-time reductions through template simplification, removed costly header dependencies, and established comprehensive documentation and analysis infrastructure. We documented our optimization strategy in BUILD_TIME_OPTIMIZATION.md and introduced Python analysis tools with Jupyter notebooks for data-driven optimization.
The Jupyter notebooks can be run directly from VSCode, giving developers powerful data analysis capabilities to examine compiler time in detail. This enables systematic investigation of template instantiation costs, compilation phase breakdowns, and identification of optimization opportunities across thousands of compilation units.
Merged PRs:
✅ #3585 - Optimized sequence generation using compiler builtins, reducing instantiations by 1.3% (101,612 fewer instantiations)
✅ #3599 - Removed std::chrono dependency from CK Tile to reduce header costs
✅ #3644 - Added Python toolkit for analyzing -ftime-trace data with pandas and Jupyter notebooks
✅ #3608 - Documented build time optimization methodology and best practices in BUILD_TIME_OPTIMIZATION.md
Upcoming Priorities
Quantify build-time improvements with a set of benchmark files as well as aggregated data across the entire build.
Merge new unit tests that lock down the current behavior of key templates, allowing more agressive refactoring.
Systematically study excessive include dependencies, especially in CK tile.
Merge improvement in ck::vector and other expensive templates.
Activity
assistant-librarian commentedon Feb 3, 2026
Comment by @shumway on 2026-01-28T05:29:43Z
Build Time Reduction Status Update for 2026.01.28
This week we identified several build-time reductions through template simplification, removed costly header dependencies, and established comprehensive documentation and analysis infrastructure. We documented our optimization strategy in BUILD_TIME_OPTIMIZATION.md and introduced Python analysis tools with Jupyter notebooks for data-driven optimization.
The Jupyter notebooks can be run directly from VSCode, giving developers powerful data analysis capabilities to examine compiler time in detail. This enables systematic investigation of template instantiation costs, compilation phase breakdowns, and identification of optimization opportunities across thousands of compilation units.
Merged PRs:
std::chronodependency from CK Tile to reduce header costs-ftime-tracedata with pandas and Jupyter notebooksUpcoming Priorities
sci-libs/composable-kernel: add 7.2.0
sci-libs/composable-kernel: add 7.2.0
Add multi-file trace parsing and analysis pipeline (#4259)
Add multi-file trace parsing and analysis pipeline (#4259)
Add multi-file trace parsing and analysis pipeline (#4259)
[CK TILE] Refactor sequence_reverse_inclusive_scan (#4355)
[CK TILE] Refactor sequence_reverse_inclusive_scan (#4355)
Add generate_identity_sequences helper and replace lambdas with named…
sci-libs/composable-kernel: add 7.2.0
Add multi-file trace parsing and analysis pipeline (ROCm#4259)
[CK TILE] Refactor sequence_reverse_inclusive_scan (ROCm#4355)
Add generate_identity_sequences helper and replace lambdas with named…
Replace nested static_for lambdas with compile-time search helper (#6696