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
fd75d3e8
Unverified
Commit
fd75d3e8
authored
Nov 14, 2025
by
Boyuan Feng
Committed by
GitHub
Nov 14, 2025
Browse files
[Minor] avoid register new custom and just import silly_attn (#28578)
Signed-off-by:
Boyuan Feng
<
boyuan@meta.com
>
parent
c9a3a021
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
tests/compile/test_config.py
tests/compile/test_config.py
+3
-9
No files found.
tests/compile/test_config.py
View file @
fd75d3e8
...
...
@@ -15,6 +15,9 @@ from vllm.engine.arg_utils import EngineArgs
from
vllm.platforms
import
current_platform
from
vllm.utils.torch_utils
import
_is_torch_equal_or_newer
# This import automatically registers `torch.ops.silly.attention`
from
.
import
silly_attention
# noqa: F401
def
test_version
():
# Test the version comparison logic using the private function
...
...
@@ -257,15 +260,6 @@ def test_should_split():
splitting_ops
=
[
"aten::add.Tensor"
]
assert
not
should_split
(
node
,
splitting_ops
)
@
torch
.
library
.
custom_op
(
"silly::attention"
,
mutates_args
=
[
"out"
],
)
def
attention
(
q
:
torch
.
Tensor
,
k
:
torch
.
Tensor
,
v
:
torch
.
Tensor
,
out
:
torch
.
Tensor
)
->
None
:
out
.
copy_
(
q
+
k
+
v
)
q
,
k
,
v
,
out
=
[
torch
.
randn
(
1
)]
*
4
# supports custom ops as OpOverloadPacket
...
...
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