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
6a585a23
Unverified
Commit
6a585a23
authored
Nov 06, 2024
by
Woosuk Kwon
Committed by
GitHub
Nov 06, 2024
Browse files
[Hotfix] Fix ruff errors (#10073)
Signed-off-by:
Woosuk Kwon
<
woosuk.kwon@berkeley.edu
>
parent
a02a50e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
setup.py
setup.py
+1
-2
vllm/executor/ray_hpu_executor.py
vllm/executor/ray_hpu_executor.py
+1
-1
vllm/worker/hpu_model_runner.py
vllm/worker/hpu_model_runner.py
+3
-4
No files found.
setup.py
View file @
6a585a23
...
...
@@ -382,8 +382,7 @@ def get_gaudi_sw_version():
output
=
subprocess
.
run
(
"hl-smi"
,
shell
=
True
,
text
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
capture_output
=
True
,
env
=
{
"ENABLE_CONSOLE"
:
"true"
})
if
output
.
returncode
==
0
and
output
.
stdout
:
return
output
.
stdout
.
split
(
"
\n
"
)[
2
].
replace
(
...
...
vllm/executor/ray_hpu_executor.py
View file @
6a585a23
...
...
@@ -34,7 +34,7 @@ class RayHPUExecutor(DistributedGPUExecutor):
uses_ray
:
bool
=
True
def
_init_executor
(
self
)
->
None
:
self
.
forward_dag
:
Optional
[
"
ray.dag.CompiledDAG
"
]
=
None
self
.
forward_dag
:
Optional
[
ray
.
dag
.
CompiledDAG
]
=
None
# If the env var is set, it uses the Ray's compiled DAG API
# which optimizes the control plane overhead.
# Run vLLM with VLLM_USE_RAY_COMPILED_DAG=1 to enable it.
...
...
vllm/worker/hpu_model_runner.py
View file @
6a585a23
...
...
@@ -67,8 +67,7 @@ class Singleton(type):
def
__call__
(
cls
,
*
args
,
**
kwargs
):
if
cls
not
in
cls
.
_instances
:
cls
.
_instances
[
cls
]
=
super
(
Singleton
,
cls
).
__call__
(
*
args
,
**
kwargs
)
cls
.
_instances
[
cls
]
=
super
().
__call__
(
*
args
,
**
kwargs
)
return
cls
.
_instances
[
cls
]
...
...
@@ -273,7 +272,7 @@ def precompute_indices_and_offsets(block_size, slot_mapping, is_prompt):
return
indices
,
offsets
class
HpuModelAdapter
()
:
class
HpuModelAdapter
:
def
__init__
(
self
,
model
,
block_size
,
dtype
,
enforce_eager
):
self
.
model
=
model
...
...
@@ -1643,7 +1642,7 @@ def _maybe_wrap_in_hpu_graph(*args, **kwargs):
)
if
htorch
.
utils
.
internal
.
is_lazy
()
else
HpuModelAdapter
(
*
args
,
**
kwargs
)
class
HabanaProfilerCounterHelper
()
:
class
HabanaProfilerCounterHelper
:
def
__init__
(
self
):
self
.
niter
=
0
...
...
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