Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6e7c8326
Commit
6e7c8326
authored
Mar 04, 2026
by
liuchy5
Browse files
feat:fix dsa
parent
db85ab07
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
vllm/model_executor/custom_op.py
vllm/model_executor/custom_op.py
+1
-1
vllm/model_executor/layers/sparse_attn_indexer.py
vllm/model_executor/layers/sparse_attn_indexer.py
+5
-5
No files found.
vllm/model_executor/custom_op.py
View file @
6e7c8326
...
@@ -184,7 +184,7 @@ class CustomOp(nn.Module):
...
@@ -184,7 +184,7 @@ class CustomOp(nn.Module):
return
self
.
maybe_compile
(
self
.
forward_native
,
enable
=
compile_native
)
return
self
.
maybe_compile
(
self
.
forward_native
,
enable
=
compile_native
)
if
current_platform
.
is_rocm
():
if
current_platform
.
is_rocm
():
return
self
.
forward_
hip
return
self
.
forward_
cuda
elif
current_platform
.
is_cpu
():
elif
current_platform
.
is_cpu
():
return
self
.
forward_cpu
return
self
.
forward_cpu
elif
current_platform
.
is_tpu
():
elif
current_platform
.
is_tpu
():
...
...
vllm/model_executor/layers/sparse_attn_indexer.py
View file @
6e7c8326
...
@@ -88,13 +88,13 @@ def sparse_attn_indexer(
...
@@ -88,13 +88,13 @@ def sparse_attn_indexer(
prefill_metadata
=
attn_metadata
.
prefill
prefill_metadata
=
attn_metadata
.
prefill
# Get the full shared workspace buffers once (will allocate on first use)
# Get the full shared workspace buffers once (will allocate on first use)
if
not
current_platform
.
is_rocm
()
or
torch
.
cuda
.
get_device_properties
(
"cuda"
).
gcnArchName
.
split
(
':'
)[
0
]
==
"gfx938"
:
workspace_manager
=
current_workspace_manager
()
workspace_manager
=
current_workspace_manager
()
k_fp8_full
,
k_scale_full
=
workspace_manager
.
get_simultaneous
(
k_fp8_full
,
k_scale_full
=
workspace_manager
.
get_simultaneous
(
((
total_seq_lens
,
head_dim
),
fp8_dtype
),
((
total_seq_lens
,
head_dim
),
fp8_dtype
if
not
current_platform
.
is_rocm
()
or
torch
.
cuda
.
get_device_properties
(
"cuda"
).
gcnArchName
.
split
(
':'
)[
0
]
==
"gfx938"
else
k
.
dtype
,
),
((
total_seq_lens
,
4
),
torch
.
uint8
),
((
total_seq_lens
,
4
),
torch
.
uint8
),
)
)
for
chunk
in
prefill_metadata
.
chunks
:
for
chunk
in
prefill_metadata
.
chunks
:
if
not
current_platform
.
is_rocm
()
or
torch
.
cuda
.
get_device_properties
(
"cuda"
).
gcnArchName
.
split
(
':'
)[
0
]
==
"gfx938"
:
k_fp8
=
k_fp8_full
[:
chunk
.
total_seq_lens
]
k_fp8
=
k_fp8_full
[:
chunk
.
total_seq_lens
]
k_scale
=
k_scale_full
[:
chunk
.
total_seq_lens
]
k_scale
=
k_scale_full
[:
chunk
.
total_seq_lens
]
ops
.
cp_gather_indexer_k_quant_cache
(
ops
.
cp_gather_indexer_k_quant_cache
(
...
...
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