SIGN IN SIGN UP

FlashInfer: Kernel Library for LLM Serving

0 0 188 Python

Ameyn/gdn bf16 dispatcher and 4d pool (#3268)

<!-- .github/pull_request_template.md -->

## ๐Ÿ“Œ Description

<!-- What does this PR do? Briefly describe the changes and why theyโ€™re
needed. -->

## ๐Ÿ” Related Issues

<!-- Link any related issues here -->

## ๐Ÿš€ Pull Request Checklist

Thank you for contributing to FlashInfer! Before we review your pull
request, please make sure the following items are complete.

### โœ… Pre-commit Checks

- [x] I have installed `pre-commit` by running `pip install pre-commit`
(or used your preferred method).
- [x] I have installed the hooks with `pre-commit install`.
- [x] I have run the hooks manually with `pre-commit run --all-files`
and fixed any reported issues.

> If you are unsure about how to set up `pre-commit`, see [the
pre-commit documentation](https://pre-commit.com/).

## ๐Ÿงช Tests

- [ ] Tests have been added or updated as needed.
- [ ] All tests are passing (`unittest`, etc.).

## Reviewer Notes

<!-- Optional: anything you'd like reviewers to focus on, concerns, etc.
-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Fixed BF16 decode to correctly handle padded/non-contiguous state
pools and to reuse caller-provided BF16 output buffers without
unnecessary copies.

* **Optimizations**
* Kernel compilation now differentiates pool memory layouts to produce
correct, efficient code for strided pools.

* **Tests**
* Added a CUDA regression test validating BF16 decoding with
padded/strided pool layouts.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/flashinfer-ai/flashinfer/pull/3268?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A
ameynaik-hub committed
f5e533ce8511674c39aba4ab13cf201f54f6eafd
Parent: 194930c
Committed by GitHub <noreply@github.com> on 5/19/2026, 9:33:55 PM