-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Port most vLLM kernels to ROCm #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
43af310
port dtype_float16.cuh and cache_kernels.cu
pcmoritz cc81866
port dtype_bfloat16.cuh
pcmoritz 475b5e2
port attention_utils.cuh
pcmoritz ddc496c
port more kernels
pcmoritz 5eaa7a1
fix typo
pcmoritz f7273c6
add cuda_compat.h
pcmoritz 99c3be7
Merge branch 'main' into port-to-rocm
pcmoritz f8093dc
sync branches
pcmoritz 41df689
update
pcmoritz 93be9c5
update
pcmoritz d96fa3c
fixes
pcmoritz 421365b
cleanup
pcmoritz 06b800e
update
pcmoritz 2312beb
update
pcmoritz 2958b39
update
pcmoritz 3f89734
fmt
pcmoritz 5397a57
cleanup
pcmoritz 90e02d2
refactor
pcmoritz a420202
update
pcmoritz b072182
Merge branch 'main' into port-to-rocm
pcmoritz 2d1e435
detecting rocm and adding flag for compiling
iAmir97 e231b79
using asm volatile instead of hip api
iAmir97 31bb335
using asm volatile for type casting of f16
iAmir97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #pragma once | ||
|
|
||
| #ifndef USE_ROCM | ||
| #define VLLM_LDG(arg) __ldg(arg) | ||
| #else | ||
| #define VLLM_LDG(arg) *(arg) | ||
| #endif | ||
|
|
||
| #ifndef USE_ROCM | ||
| #define VLLM_SHFL_XOR_SYNC(var, lane_mask) __shfl_xor_sync(uint32_t(-1), var, lane_mask) | ||
| #else | ||
| #define VLLM_SHFL_XOR_SYNC(var, lane_mask) __shfl_xor(var, lane_mask) | ||
| #endif | ||
|
|
||
| #ifndef USE_ROCM | ||
| #define VLLM_SHFL_SYNC(var, src_lane) __shfl_sync(uint32_t(-1), var, src_lane); | ||
| #else | ||
| #define VLLM_SHFL_SYNC(var, src_lane) __shfl(var, src_lane) | ||
| #endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| #ifdef USE_ROCM | ||
| #include <hip/hip_runtime.h> | ||
| #endif | ||
|
|
||
| int get_device_attribute( | ||
| int attribute, | ||
| int device_id) | ||
|
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.