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
1eb8eade
Unverified
Commit
1eb8eade
authored
Feb 20, 2025
by
yizhang2077
Committed by
GitHub
Feb 20, 2025
Browse files
add control for cutlass fp8 blockwise gemm (#3727)
parent
3c7bfd7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
python/sglang/srt/layers/quantization/fp8_utils.py
python/sglang/srt/layers/quantization/fp8_utils.py
+3
-0
No files found.
python/sglang/srt/layers/quantization/fp8_utils.py
View file @
1eb8eade
import
os
from
typing
import
List
,
Optional
,
Tuple
from
typing
import
List
,
Optional
,
Tuple
import
torch
import
torch
...
@@ -40,6 +41,8 @@ def normalize_e4m3fn_to_e4m3fnuz(
...
@@ -40,6 +41,8 @@ def normalize_e4m3fn_to_e4m3fnuz(
def
cutlass_block_fp8_supported
()
->
bool
:
def
cutlass_block_fp8_supported
()
->
bool
:
if
os
.
environ
.
get
(
"SUPPORT_CUTLASS_BLOCK_FP8"
)
is
None
:
return
False
if
_is_cuda
:
if
_is_cuda
:
major
,
minor
=
torch
.
cuda
.
get_device_capability
()
major
,
minor
=
torch
.
cuda
.
get_device_capability
()
sm_version
=
major
*
10
+
minor
sm_version
=
major
*
10
+
minor
...
...
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