[Test] Enhance JIT kvcache store kernel test coverage#19630
[Test] Enhance JIT kvcache store kernel test coverage#19630BBuf merged 3 commits intosgl-project:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the test coverage for the JIT KV cache store kernel. The changes introduce several new test functions designed to validate the kernel's behavior under a wider range of data types, index tensor types, and Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request significantly enhances the test coverage for the JIT kvcache store kernel by adding tests for various data types, index types, and num_split configurations. The new tests are well-structured and use smaller, representative datasets for efficiency. I've identified a key area for improvement in the num_split test to ensure it covers all data types, and a minor refinement for code clarity and efficiency. Overall, these are valuable additions that increase confidence in the kernel's correctness.
fc7d73d to
c33f1d3
Compare
| assert can_use_store_cache(1024) | ||
| assert can_use_store_cache(2048) | ||
|
|
||
| assert not can_use_store_cache(5) |
There was a problem hiding this comment.
my only concern is do we need to assert not supported? we might add support for corner cases later
There was a problem hiding this comment.
removed assert not cases. could you help trigger CI tests for this PR?
|
/tag-and-rerun-ci |
|
/rerun-failed-ci |
1958306 to
541f0bc
Compare
|
/rerun-failed-ci |
|
/rerun-stage jit-kernel-unit-test |
|
❌ Stage NVIDIA stages:
AMD stages:
Other stages will be added soon. For now, use |
|
/rerun-failed-ci |
1 similar comment
|
/rerun-failed-ci |
|
Hi @DarkSharpness @HydraQYH I noticed this PR has been blocked by unrelated CI failures. Even multiple CI reruns didn't help. Could you help take a look at the CI or merge it directly if acceptable? thanks. |
Motivation
The existing
test_store_cacheonly tests bf16 + int64 indices. This leaves several CUDA template paths untested (#17035).Modifications
Add 4 tests to
test_store_cache.py:test_store_cache_dtypes: fp16/bf16/fp32test_store_cache_int32_indices: int32 index path (would have caught Fix wrong kernel selection for int32/int64 indices #16912)test_store_cache_num_split: explicit num_split=1/2/4test_can_use_store_cache: guard functionOriginal tests unchanged.
Accuracy Tests
N/A — this PR only adds tests, no changes to kernel or model code.
Benchmarking and Profiling
N/A — no inference speed impact, test-only change.
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci