[BugFix][CUDA] Restore cp.async for predicated zero-fill copies - #2926
[BugFix][CUDA] Restore cp.async for predicated zero-fill copies#2926hebo1221 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughPipeline planning now detects pure parallel guarded global-to-shared copies with zero-fill fallbacks, records their stage metadata, and allows them as asynchronous producers. Planner and CUDA tests cover accepted and rejected patterns. ChangesPredicated zero-fill copy support
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant PipelineStageAnalysis
participant ZeroFillCopyMatcher
participant AsyncProducerEligibility
participant CUDATestKernel
PipelineStageAnalysis->>ZeroFillCopyMatcher: inspect guarded parallel copy
ZeroFillCopyMatcher-->>PipelineStageAnalysis: classify total zero-fill copy
PipelineStageAnalysis->>AsyncProducerEligibility: evaluate conditional stage
AsyncProducerEligibility-->>PipelineStageAnalysis: allow asynchronous producer
PipelineStageAnalysis->>CUDATestKernel: generate predicated pipeline copy
CUDATestKernel-->>PipelineStageAnalysis: emit cp_async_gs and zero-fill behavior
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
Fixes #2759.
A bounds-checked global-to-shared copy with a zero-fill else branch writes the same shared-memory location on every path, but PipelinePlanning currently rejects it as a conditional async producer.
This recognizes only that total-copy pattern. Loop bounds, the condition, and all source and destination indices must be pure; partial copies, nonzero fallbacks, and state-dependent guards or indices remain synchronous.
Tested:
Summary
cp.asynclowering for pure, predicated global-to-shared copies with total zero-fill fallbacks.total_zero_fill_copymetadata toPipelineStageInfo.Validation
cp.asyncgeneration and correct zero-filled tail values.cp.async.cg.shared.globalinstructions and 32 LDGSTS sites.C++ style / lint notes
src/transform/pipeline_planning.cc.docs/developer_guide/cpp_style.md.C++ API Style Audit (warning only).