[Refactor] remove torch dependency from cache kernel - #2086
Draft
DwyaneShi wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the KV cache operations to remove the dependency on torch.ops and vllm by transitioning to a ctypes-based interface for CUDA kernels. Key changes include updating the build system to use CUDAToolkit directly, rewriting CUDA kernels to use raw pointers and a C-compatible interface, and implementing local test utilities. Review feedback identified a critical bug in the data type dispatch logic for FP8 offloading, an incorrect variable name in the CMake configuration, and potential issues with platform portability and silent precision loss for FP64 types.
DwyaneShi
marked this pull request as draft
April 8, 2026 00:11
DwyaneShi
force-pushed
the
haiyang/rm-torch-dep-kernel
branch
4 times, most recently
from
April 10, 2026 04:50
491d4fd to
4553710
Compare
Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com>
DwyaneShi
force-pushed
the
haiyang/rm-torch-dep-kernel
branch
from
April 10, 2026 05:04
4553710 to
ff54357
Compare
Collaborator
|
@DwyaneShi is this still WIP |
Collaborator
Author
Yes, haven't conducted w/ e2e testing yet |
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.
Pull Request Description
Related Issues
Resolves: #[Insert issue number(s)]
Important: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]: Corrections to existing functionality[CI]: Changes to build process or CI pipeline[Docs]: Updates or additions to documentation[API]: Modifications to aibrix's API or interface[CLI]: Changes or additions to the Command Line Interface[Misc]: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.