-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ROCm: sgl-kernel enablement starting with sgl_moe_align_block #3287
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
Conversation
if is_cuda: | ||
from sgl_kernel import moe_align_block_size as sgl_moe_align_block_size | ||
|
||
from sgl_kernel import moe_align_block_size as sgl_moe_align_block_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add is_cuda or is_hip here, we shouldn't disrupt other devices (such as xpu, hpu, etc.).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make though this one (code followed previous), I will add that in follow up, sounds good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
|
||
sources = [ | ||
"src/sgl-kernel/torch_extension_rocm.cc", | ||
"src/sgl-kernel/csrc/moe_align_kernel.cu", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to update this for ROCm?
sglang/sgl-kernel/src/sgl-kernel/csrc/moe_align_kernel.cu
Lines 27 to 28 in 70817a7
#define DevFuncAttribute_SET_MaxDynamicSharedMemorySize(FUNC, VAL) \ | |
cudaFuncSetAttribute(FUNC, cudaFuncAttributeMaxDynamicSharedMemorySize, VAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not this moment, works now. We will do deeper custom later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I just remember to remove the ROCm-related code earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhyncs created 2 issues to work on asap, thx.
Motivation
Modifications
As they are.
Checklist