Add test_batch_prefill.cpp to HIP#43
Merged
demandal25 merged 6 commits intoROCm:amd-integrationfrom Nov 14, 2025
Merged
Conversation
955f683 to
1634298
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR ports the test_batch_prefill test suite to HIP and adds essential wrapper functions and the BatchPrefillHandler class to support testing of batch prefill kernels with both paged and ragged KV cache layouts.
- Introduces comprehensive test coverage for batch prefill operations including one-hot, short context, long context, and zero context scenarios
- Adds
BatchPrefillHandlerclass for managing workspace buffers and planning batch prefill operations - Provides wrapper functions
BatchPrefillWithPagedKVCacheWrapperandBatchPrefillWithRaggedKVCacheWrapperfor convenient kernel invocation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 15 comments.
| File | Description |
|---|---|
| libflashinfer/utils/flashinfer_prefill_ops_hip.h | Adds BatchPrefillHandler class and wrapper functions for batch prefill operations with paged and ragged KV caches |
| libflashinfer/tests/hip/test_batch_prefill.cpp | New comprehensive test suite with multiple test cases covering various batch prefill scenarios for HIP backend |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
demandal25
approved these changes
Nov 14, 2025
Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com>
diptorupd
pushed a commit
that referenced
this pull request
Dec 5, 2025
In this PR, we add infra for enabling decode via flashinfer gpu_iface.
This PR does not change existing infrastructure and we can still build
decode using AOT and JIT.
Tested locally
```
Start 5: SingleDecodeTest
5/6 Test #5: SingleDecodeTest ................. Passed 35.12 sec
Start 6: BatchDecodeTest
6/6 Test #6: BatchDecodeTest .................. Passed 541.87 sec
```
We will have a follow up PR for enabling AOT decode using flashinfer
gpu_iface
diptorupd
pushed a commit
that referenced
this pull request
Dec 5, 2025
This PR ports over the `test_batch_prefill` to HIP and adds the necessary utility functions to `flashinfer_prefill_ops`. This is required for testing the `BatchPrefillWithPagedKVCache` and `BatchPrefillWithRaggedPagedKVCache` kernels. --------- Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com> Co-authored-by: Debasis Mandal <Debasis.Mandal@amd.com>
zhenhantech
pushed a commit
to zhenhantech/flashinfer
that referenced
this pull request
Jan 9, 2026
In this PR, we add infra for enabling decode via flashinfer gpu_iface.
This PR does not change existing infrastructure and we can still build
decode using AOT and JIT.
Tested locally
```
Start 5: SingleDecodeTest
5/6 Test ROCm#5: SingleDecodeTest ................. Passed 35.12 sec
Start 6: BatchDecodeTest
6/6 Test ROCm#6: BatchDecodeTest .................. Passed 541.87 sec
```
We will have a follow up PR for enabling AOT decode using flashinfer
gpu_iface
zhenhantech
pushed a commit
to zhenhantech/flashinfer
that referenced
this pull request
Jan 9, 2026
This PR ports over the `test_batch_prefill` to HIP and adds the necessary utility functions to `flashinfer_prefill_ops`. This is required for testing the `BatchPrefillWithPagedKVCache` and `BatchPrefillWithRaggedPagedKVCache` kernels. --------- Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com> Co-authored-by: Debasis Mandal <Debasis.Mandal@amd.com>
diptorupd
pushed a commit
to diptorupd/flashinfer
that referenced
this pull request
Jan 28, 2026
In this PR, we add infra for enabling decode via flashinfer gpu_iface.
This PR does not change existing infrastructure and we can still build
decode using AOT and JIT.
Tested locally
```
Start 5: SingleDecodeTest
5/6 Test #5: SingleDecodeTest ................. Passed 35.12 sec
Start 6: BatchDecodeTest
6/6 Test #6: BatchDecodeTest .................. Passed 541.87 sec
```
We will have a follow up PR for enabling AOT decode using flashinfer
gpu_iface
diptorupd
pushed a commit
to diptorupd/flashinfer
that referenced
this pull request
Jan 28, 2026
This PR ports over the `test_batch_prefill` to HIP and adds the necessary utility functions to `flashinfer_prefill_ops`. This is required for testing the `BatchPrefillWithPagedKVCache` and `BatchPrefillWithRaggedPagedKVCache` kernels. --------- Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com> Co-authored-by: Debasis Mandal <Debasis.Mandal@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports over the
test_batch_prefillto HIP and adds the necessary utility functions toflashinfer_prefill_ops.This is required for testing the
BatchPrefillWithPagedKVCacheandBatchPrefillWithRaggedPagedKVCachekernels.