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
5a66c9cc
Unverified
Commit
5a66c9cc
authored
Jan 29, 2026
by
Angela Yi
Committed by
GitHub
Jan 29, 2026
Browse files
[ez] Delete torch25_custom_graph_pass (#33287)
Signed-off-by:
angelayi
<
yiangela7@gmail.com
>
parent
5e73e490
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
44 deletions
+0
-44
vllm/compilation/torch25_custom_graph_pass.py
vllm/compilation/torch25_custom_graph_pass.py
+0
-44
No files found.
vllm/compilation/torch25_custom_graph_pass.py
deleted
100644 → 0
View file @
5e73e490
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
abc
import
ABC
,
abstractmethod
from
typing
import
Any
,
NoReturn
import
torch
class
Torch25CustomGraphPass
(
ABC
):
# noqa (redefinition)
"""
This class replaces CustomGraphPass from torch==2.6 when using torch<2.6.
It conforms to the 2.6 interface but also supports pickling, as that's what
the inductor code cache uses to determine the cache key before 2.6.
(in 2.6 and above, uuid() is used.)
Subclasses can just "pretend" that uuid is used.
"""
@
abstractmethod
def
__call__
(
self
,
graph
:
torch
.
fx
.
graph
.
Graph
)
->
None
:
"""
Implementation of the custom pass.
"""
@
abstractmethod
def
uuid
(
self
)
->
Any
|
None
:
"""
Return an ID to uniquely identify your custom pass implementation.
Return None to skip inductor code caching entirely.
"""
def
__getstate__
(
self
)
->
Any
|
None
:
"""
Pickling is used instead of uuid() in torch<2.6. Just return uuid()
to enable subclasses to only have to implement uuid.
"""
return
self
.
uuid
()
def
__setstate__
(
self
,
state
:
Any
)
->
NoReturn
:
raise
ValueError
(
"Cannot unpickle CustomGraphPass because pickling"
" is used for cache key uuid. Use torch>=2.6 with"
" native uuid support for custom passes."
)
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