Skip to content

[Bugfix] Improve robustness of ProveFragmentContains with fully replicated layout#1709

Merged
LeiWang1999 merged 2 commits intotile-ai:mainfrom
LeiWang1999:fix_0122
Jan 21, 2026
Merged

[Bugfix] Improve robustness of ProveFragmentContains with fully replicated layout#1709
LeiWang1999 merged 2 commits intotile-ai:mainfrom
LeiWang1999:fix_0122

Conversation

@LeiWang1999
Copy link
Member

@LeiWang1999 LeiWang1999 commented Jan 21, 2026

as title.

Summary by CodeRabbit

  • Refactor
    • Optimized fragment replication handling with early exit logic for improved performance when fragments are fully replicated.
    • Refined parameter handling in fragment validation operations for cleaner code organization.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

An optimization in ProveFragmentContains adds an early exit when a large fragment is completely replicated, and adjusts how the check_forward_index flag is passed at caller sites—one explicitly set to true, another relying on default behavior.

Changes

Cohort / File(s) Summary
ProveFragmentContains Optimization
src/op/parallel.cc
Added early exit condition: returns true immediately if the large fragment is completely replicated. Updated caller sites to explicitly pass check_forward_index flag (true in one call) and delegate without explicit flag passing in the ChooseBestCandidate contains helper.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A rabbit hops with early cheer,
When fragments fully replicate here!
No need to check the forward way,
Early exit saves the day! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main change: a bug fix that improves robustness of ProveFragmentContains when handling fully replicated layouts, which directly aligns with the code changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run pre-commit run --all-files in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀

@LeiWang1999 LeiWang1999 merged commit 8c15eca into tile-ai:main Jan 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant