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
ce2702a9
Unverified
Commit
ce2702a9
authored
Sep 06, 2024
by
youkaichao
Committed by
GitHub
Sep 06, 2024
Browse files
[tpu][misc] fix typo (#8260)
parent
795b662c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
tests/compile/test_wrapper.py
tests/compile/test_wrapper.py
+2
-2
vllm/compilation/wrapper.py
vllm/compilation/wrapper.py
+1
-1
vllm/worker/tpu_model_runner.py
vllm/worker/tpu_model_runner.py
+2
-2
No files found.
tests/compile/test_wrapper.py
View file @
ce2702a9
...
@@ -2,7 +2,7 @@ from typing import Optional
...
@@ -2,7 +2,7 @@ from typing import Optional
import
torch
import
torch
from
vllm.compilation.wrapper
import
TorchCompileWrapperWithCustomDispa
c
ther
from
vllm.compilation.wrapper
import
TorchCompileWrapperWithCustomDispat
c
her
class
MyMod
(
torch
.
nn
.
Module
):
class
MyMod
(
torch
.
nn
.
Module
):
...
@@ -13,7 +13,7 @@ class MyMod(torch.nn.Module):
...
@@ -13,7 +13,7 @@ class MyMod(torch.nn.Module):
return
x
*
2
return
x
*
2
class
MyWrapper
(
TorchCompileWrapperWithCustomDispa
c
ther
):
class
MyWrapper
(
TorchCompileWrapperWithCustomDispat
c
her
):
def
__init__
(
self
,
model
):
def
__init__
(
self
,
model
):
self
.
model
=
model
self
.
model
=
model
...
...
vllm/compilation/wrapper.py
View file @
ce2702a9
...
@@ -10,7 +10,7 @@ import torch
...
@@ -10,7 +10,7 @@ import torch
import
vllm.envs
as
envs
import
vllm.envs
as
envs
class
TorchCompileWrapperWithCustomDispa
c
ther
:
class
TorchCompileWrapperWithCustomDispat
c
her
:
"""
"""
A wrapper class for torch.compile, with a custom dispatch logic.
A wrapper class for torch.compile, with a custom dispatch logic.
Subclasses should:
Subclasses should:
...
...
vllm/worker/tpu_model_runner.py
View file @
ce2702a9
...
@@ -11,7 +11,7 @@ import torch_xla.core.xla_model as xm
...
@@ -11,7 +11,7 @@ import torch_xla.core.xla_model as xm
import
torch_xla.runtime
as
xr
import
torch_xla.runtime
as
xr
from
vllm.attention
import
AttentionMetadata
,
get_attn_backend
from
vllm.attention
import
AttentionMetadata
,
get_attn_backend
from
vllm.compilation.wrapper
import
TorchCompileWrapperWithCustomDispa
c
ther
from
vllm.compilation.wrapper
import
TorchCompileWrapperWithCustomDispat
c
her
from
vllm.config
import
(
CacheConfig
,
DeviceConfig
,
LoadConfig
,
ModelConfig
,
from
vllm.config
import
(
CacheConfig
,
DeviceConfig
,
LoadConfig
,
ModelConfig
,
ParallelConfig
,
SchedulerConfig
)
ParallelConfig
,
SchedulerConfig
)
from
vllm.logger
import
init_logger
from
vllm.logger
import
init_logger
...
@@ -611,7 +611,7 @@ class TPUModelRunner(ModelRunnerBase[ModelInputForTPU]):
...
@@ -611,7 +611,7 @@ class TPUModelRunner(ModelRunnerBase[ModelInputForTPU]):
return
[
SamplerOutput
(
sampler_outputs
)]
return
[
SamplerOutput
(
sampler_outputs
)]
class
ModelWrapper
(
TorchCompileWrapperWithCustomDispa
c
ther
):
class
ModelWrapper
(
TorchCompileWrapperWithCustomDispat
c
her
):
def
__init__
(
self
,
model
:
nn
.
Module
):
def
__init__
(
self
,
model
:
nn
.
Module
):
self
.
model
=
model
self
.
model
=
model
...
...
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