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
f57d2dc1
Unverified
Commit
f57d2dc1
authored
Aug 04, 2025
by
Xiaoyu Zhang
Committed by
GitHub
Aug 04, 2025
Browse files
[sgl-kernel] avoid per_token_quant_fp8.cu hardcode sm_count (#8738)
parent
f2d68ded
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
sgl-kernel/csrc/gemm/per_token_quant_fp8.cu
sgl-kernel/csrc/gemm/per_token_quant_fp8.cu
+2
-3
No files found.
sgl-kernel/csrc/gemm/per_token_quant_fp8.cu
View file @
f57d2dc1
...
@@ -173,9 +173,8 @@ void sgl_per_token_quant_fp8(torch::Tensor input, torch::Tensor output_q, torch:
...
@@ -173,9 +173,8 @@ void sgl_per_token_quant_fp8(torch::Tensor input, torch::Tensor output_q, torch:
TORCH_CHECK
(
hidden_dim
%
8
==
0
,
"Hidden dimension must be divisible by 8, but got "
,
hidden_dim
);
TORCH_CHECK
(
hidden_dim
%
8
==
0
,
"Hidden dimension must be divisible by 8, but got "
,
hidden_dim
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrentCUDAStream
();
cudaStream_t
stream
=
at
::
cuda
::
getCurrentCUDAStream
();
// Hard-code sm_count
const
int
sm_count
=
at
::
cuda
::
getCurrentDeviceProperties
()
->
multiProcessorCount
;
int
sm_count
=
132
;
const
int
TOKENS_PER_CTA
=
8
;
constexpr
int
TOKENS_PER_CTA
=
8
;
const
bool
use_warp_kernel
=
(
num_tokens
>=
sm_count
*
2
*
TOKENS_PER_CTA
);
const
bool
use_warp_kernel
=
(
num_tokens
>=
sm_count
*
2
*
TOKENS_PER_CTA
);
const
bool
use_vec16
=
(
hidden_dim
%
16
==
0
);
const
bool
use_vec16
=
(
hidden_dim
%
16
==
0
);
...
...
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