Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
7a16db9b
Unverified
Commit
7a16db9b
authored
Aug 28, 2025
by
hlu1
Committed by
GitHub
Aug 28, 2025
Browse files
Make sm100 fp8 kernels available on sm103 (#9789)
Signed-off-by:
Hao Lu
<
14827759+hlu1@users.noreply.github.com
>
parent
09a1df22
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
sgl-kernel/csrc/gemm/fp8_blockwise_gemm_kernel.cu
sgl-kernel/csrc/gemm/fp8_blockwise_gemm_kernel.cu
+5
-1
sgl-kernel/csrc/gemm/fp8_gemm_kernel.cu
sgl-kernel/csrc/gemm/fp8_gemm_kernel.cu
+5
-1
sgl-kernel/csrc/moe/fp8_blockwise_moe_kernel.cu
sgl-kernel/csrc/moe/fp8_blockwise_moe_kernel.cu
+6
-2
No files found.
sgl-kernel/csrc/gemm/fp8_blockwise_gemm_kernel.cu
View file @
7a16db9b
...
...
@@ -260,7 +260,11 @@ torch::Tensor fp8_blockwise_scaled_mm(
#if defined(CUTLASS_ARCH_MMA_SM100A_SUPPORTED) || defined(CUTLASS_ARCH_MMA_SM100_SUPPORTED)
#if defined CUDA_VERSION && CUDA_VERSION >= 12080
if
(
sm_version
==
100
)
{
if
(
sm_version
==
100
#if CUDA_VERSION >= 12090
||
sm_version
==
103
#endif
)
{
if
(
out_dtype
==
torch
::
kBFloat16
)
{
sm100_fp8_blockwise_dispatch_shape
<
cutlass
::
bfloat16_t
>
(
out_padded
,
mat_a_padded
,
mat_b
,
scales_a_padded
,
scales_b
);
...
...
sgl-kernel/csrc/gemm/fp8_gemm_kernel.cu
View file @
7a16db9b
...
...
@@ -1212,7 +1212,11 @@ torch::Tensor fp8_scaled_mm(
auto
sm_version
=
getSMVersion
();
#if defined CUDA_VERSION && CUDA_VERSION >= 12080
if
(
sm_version
>=
100
)
{
if
(
sm_version
==
100
#if CUDA_VERSION >= 12090
||
sm_version
==
103
#endif
)
{
if
(
out_dtype
==
torch
::
kBFloat16
)
{
sm100_fp8_dispatch_shape
<
cutlass
::
bfloat16_t
>
(
out
,
mat_a
,
mat_b
,
scales_a
,
scales_b
,
bias
);
}
else
{
...
...
sgl-kernel/csrc/moe/fp8_blockwise_moe_kernel.cu
View file @
7a16db9b
...
...
@@ -708,7 +708,11 @@ void fp8_blockwise_scaled_grouped_mm(
#if defined(CUTLASS_ARCH_MMA_SM100A_SUPPORTED) || defined(CUTLASS_ARCH_MMA_SM100_SUPPORTED)
#if defined CUDA_VERSION && CUDA_VERSION >= 12080
if
(
sm_version
==
100
)
{
if
(
sm_version
==
100
#if CUDA_VERSION >= 12090
||
sm_version
==
103
#endif
)
{
if
(
output
.
scalar_type
()
==
torch
::
kBFloat16
)
{
sm100_fp8_blockwise_group_mm_dispatch_shape
<
cutlass
::
bfloat16_t
>
(
output
,
...
...
@@ -802,5 +806,5 @@ void fp8_blockwise_scaled_grouped_mm(
}
#endif
TORCH_CHECK_NOT_IMPLEMENTED
(
can_implement
,
"No implemented fp8_blockwise_scaled_mm for current compute capability: "
,
sm_version
);
can_implement
,
"No implemented fp8_blockwise_scaled_
grouped_
mm for current compute capability: "
,
sm_version
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment