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
d3e67deb
Unverified
Commit
d3e67deb
authored
Aug 09, 2025
by
fzyzcjy
Committed by
GitHub
Aug 09, 2025
Browse files
Fix redundant kernel in sink dtype conversion (#8966)
parent
442534aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/sglang/srt/models/gpt_oss.py
python/sglang/srt/models/gpt_oss.py
+2
-2
No files found.
python/sglang/srt/models/gpt_oss.py
View file @
d3e67deb
...
...
@@ -247,7 +247,7 @@ class GptOssAttention(nn.Module):
)
self
.
sinks
=
nn
.
Parameter
(
torch
.
empty
(
self
.
num_heads
,
dtype
=
params_dtype
),
requires_grad
=
False
torch
.
empty
(
self
.
num_heads
,
dtype
=
torch
.
float32
),
requires_grad
=
False
)
self
.
o_proj
=
RowParallelLinear
(
...
...
@@ -301,7 +301,7 @@ class GptOssAttention(nn.Module):
hidden_states
,
forward_batch
,
inner_state
=
intermediate_state
if
inner_state
is
None
:
return
hidden_states
attn_output
=
self
.
attn
(
*
inner_state
,
sinks
=
self
.
sinks
.
to
(
torch
.
float32
)
)
attn_output
=
self
.
attn
(
*
inner_state
,
sinks
=
self
.
sinks
)
output
,
_
=
self
.
o_proj
(
attn_output
)
return
output
...
...
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