Validate mbarrier arrive-count upper bound - #3368
dajiaohuang wants to merge 1 commit into
Conversation
|
👋 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! 🚀 |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: tile-ai/tilelang/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughBarrier allocation functions now reject arrive counts above ChangesBarrier arrive count limits
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The allocator changes and boundary-test assertions align with the stated arrive-count range. The focused tests could not run in this checkout, so normal CI should confirm them before merge. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change strengthens an existing input limit without adding access, privileges, or external exposure. Unsupported counts are rejected before barrier allocation. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Summary
This follows up on #3030. Merged #3112 rejected non-positive values; a positive value of 2^20 was still forwarded to codegen. The upper bound is specified in the NVIDIA PTX ISA 9.0.
Validation
Summary
This PR adds an upper-bound check for
arrive_countinalloc_barrierandalloc_cluster_barrier. Both functions accept counts from 1 through2**20 - 1and reject larger counts.The regression test covers the maximum valid count and invalid counts above the limit, including shaped counts.
Validation
The supplied PR context reports that Ruff check and format, Python syntax compilation, and
git diff --checkpass. Focused pytest collection stopped in TileLang’sconftestbecausebuild/libandbuild/tvmare missing. No test cases ran.