Skip to content

Conversation

@LJC00118
Copy link
Collaborator

@LJC00118 LJC00118 commented Jan 21, 2026

Summary by CodeRabbit

  • Chores

    • Removed an intermediate unsafe-select rewrite from the optimization pipeline to streamline compilation behavior.
  • Tests

    • Added tests validating conditional selection correctness and ensuring generated kernels do not emit Python-level conditional statements.

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

@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! 🚀

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Removed the RewriteUnsafeSelect pass from the OptimizeForTarget pipeline; added a new Python test module that exercises T.Select semantics and verifies generated kernel source contains no Python-level if statements.

Changes

Cohort / File(s) Summary
Pass pipeline modification
tilelang/engine/phase.py
Removed the RewriteUnsafeSelect invocation from the OptimizeForTarget optimization sequence; pipeline now flows from Simplify/RemoveNoOp to HoistIfThenElse and VerifyMemory without that pass.
Tests added
testing/python/language/test_tilelang_language_select.py
New test module introducing two JIT-wrapped kernels using T.Select across operands/branches and tests for correctness against CUDA tensors and absence of Python-level if in generated kernel source.

Sequence Diagram(s)

(omitted — changes do not introduce a new multi-component control flow requiring visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through passes, nibbled one away,

Now selects skip a step and romp in play,
I spun up tests, with kernels bold and spry,
No Python ifs in code — hops touch the sky! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 describes the main change: removing the RewriteUnsafeSelect pass from the optimization pipeline, which is the primary modification in the changeset.

✏️ 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.

@LeiWang1999 LeiWang1999 merged commit 470a192 into tile-ai:main Jan 21, 2026
1 of 2 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.

2 participants