Skip to content

Conversation

@kurisu6912
Copy link
Collaborator

@kurisu6912 kurisu6912 commented Jan 27, 2026

as title

Summary by CodeRabbit

  • Bug Fixes

    • Improved parameter handling during compilation to prevent unnecessary errors with specific parameter types.
  • New Features

    • Added support for a new parameter type in the dtype system.

✏️ 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 27, 2026

📝 Walkthrough

Walkthrough

The changes modify handle-type parameter processing in two coordinated locations. In the lower.py engine module, the extract_params function no longer raises a ValueError for handle parameters missing from buffer_map, instead directly converting them to KernelParam objects. Correspondingly, dtypes.py's __dtype_as_torch__ function adds early-exit handling for "handle" dtype strings, returning None before standard dtype resolution.

Changes

Cohort / File(s) Summary
Handle Parameter Processing
tilelang/engine/lower.py, tilelang/language/dtypes.py
Modified extract_params to allow handle parameters without buffer mappings (error removed). Added "handle" dtype special-case in __dtype_as_torch__ returning None early.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A handle once raised its error cry,
Now it slips through gently, no need to deny,
With dtype and params in perfect accord,
The kernels hop forward—a rabbit's reward! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[EagerJIT] Allow dummy parameter in jit kernel' directly relates to the changes in the PR, which modify parameter handling in lower.py and dtypes.py to support handle-type (dummy) parameters without raising errors.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@tilelang/language/dtypes.py`:
- Around line 206-207: The as_torch method currently returns None for dtype_str
== "handle" but its signature and docstring claim a non-optional torch.dtype;
update the return type hint on the as_torch method to Optional[torch.dtype]
(import typing.Optional if needed) and modify the method/class docstring to
state that a "handle" dtype will return None (or alternatively, if you prefer to
keep the non-optional signature, change the branch for "handle" to raise a clear
exception). Refer to the as_torch method and the existing docstring for this
dtype class to apply the changes so the type contract matches the
implementation.

@LeiWang1999 LeiWang1999 merged commit cccf724 into tile-ai:main Jan 27, 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.

2 participants