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
6f566147
Unverified
Commit
6f566147
authored
May 06, 2025
by
Yineng Zhang
Committed by
GitHub
May 06, 2025
Browse files
chore: upgrade cutlass 3.9.2 (#6004)
Co-authored-by:
yizhang2077
<
1109276519@qq.com
>
parent
bdd17998
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
sgl-kernel/CMakeLists.txt
sgl-kernel/CMakeLists.txt
+1
-1
sgl-kernel/csrc/gemm/fp8_blockwise_gemm_kernel.cu
sgl-kernel/csrc/gemm/fp8_blockwise_gemm_kernel.cu
+10
-9
No files found.
sgl-kernel/CMakeLists.txt
View file @
6f566147
...
...
@@ -45,7 +45,7 @@ include(FetchContent)
FetchContent_Declare
(
repo-cutlass
GIT_REPOSITORY https://github.com/NVIDIA/cutlass
GIT_TAG
e94e888df3551224738bfa505787b515eae8352f
GIT_TAG
ad7b2f5e84fcfa124cb02b91d5bd26d238c0459e
GIT_SHALLOW OFF
)
FetchContent_Populate
(
repo-cutlass
)
...
...
sgl-kernel/csrc/gemm/fp8_blockwise_gemm_kernel.cu
View file @
6f566147
...
...
@@ -384,16 +384,23 @@ torch::Tensor fp8_blockwise_scaled_mm(
auto
sm_version
=
getSMVersion
();
int64_t
original_rows
=
mat_a
.
size
(
0
);
torch
::
Tensor
mat_a_padded
=
pad_tensor
(
mat_a
,
/*alignment=*/
4
);
torch
::
Tensor
scales_a_padded
=
pad_tensor
(
scales_a
,
/*alignment=*/
4
,
/*col_major=*/
true
);
torch
::
Tensor
out_padded
=
torch
::
empty
({
mat_a_padded
.
size
(
0
),
mat_b
.
size
(
1
)},
out
.
options
());
#if defined(CUTLASS_ARCH_MMA_SM90_SUPPORTED)
#if defined CUDA_VERSION && CUDA_VERSION >= 12000
if
(
sm_version
==
90
)
{
torch
::
Tensor
scales_b_contiguous
=
scales_b
.
contiguous
();
if
(
out_dtype
==
torch
::
kBFloat16
)
{
sm90_fp8_blockwise_dispatch_shape
<
cutlass
::
bfloat16_t
>
(
out
,
mat_a
,
mat_b
,
scales_a
,
scales_b_contiguous
);
sm90_fp8_blockwise_dispatch_shape
<
cutlass
::
bfloat16_t
>
(
out_padded
,
mat_a_padded
,
mat_b
,
scales_a_padded
,
scales_b_contiguous
);
}
else
{
sm90_fp8_blockwise_dispatch_shape
<
cutlass
::
half_t
>
(
out
,
mat_a
,
mat_b
,
scales_a
,
scales_b_contiguous
);
sm90_fp8_blockwise_dispatch_shape
<
cutlass
::
half_t
>
(
out_padded
,
mat_a_padded
,
mat_b
,
scales_a_padded
,
scales_b_contiguous
);
}
return
out
;
return
out
_padded
.
slice
(
0
,
0
,
original_rows
)
;
}
#endif
#endif
...
...
@@ -401,12 +408,6 @@ 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
)
{
int64_t
original_rows
=
mat_a
.
size
(
0
);
torch
::
Tensor
mat_a_padded
=
pad_tensor
(
mat_a
,
/*alignment=*/
4
);
torch
::
Tensor
scales_a_padded
=
pad_tensor
(
scales_a
,
/*alignment=*/
4
,
/*col_major=*/
true
);
torch
::
Tensor
out_padded
=
torch
::
empty
({
mat_a_padded
.
size
(
0
),
mat_b
.
size
(
1
)},
out
.
options
());
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
);
...
...
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