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
bc6e42a9
Unverified
Commit
bc6e42a9
authored
Aug 27, 2024
by
youkaichao
Committed by
GitHub
Aug 27, 2024
Browse files
[hardware][rocm] allow rocm to override default env var (#7926)
parent
fab5f53e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
vllm/core/scheduler.py
vllm/core/scheduler.py
+3
-2
vllm/platforms/rocm.py
vllm/platforms/rocm.py
+11
-0
No files found.
vllm/core/scheduler.py
View file @
bc6e42a9
...
...
@@ -1088,8 +1088,9 @@ class Scheduler:
)
def
_allow_async_output_proc
(
self
,
seq_group
:
SequenceGroup
)
->
bool
:
no_beam_search
=
(
seq_group
.
sampling_params
.
best_of
==
1
and
not
seq_group
.
sampling_params
.
use_beam_search
)
no_beam_search
=
seq_group
.
sampling_params
is
None
or
(
seq_group
.
sampling_params
.
best_of
==
1
and
not
seq_group
.
sampling_params
.
use_beam_search
)
return
no_beam_search
...
...
vllm/platforms/rocm.py
View file @
bc6e42a9
import
os
from
functools
import
lru_cache
from
typing
import
Tuple
import
torch
from
vllm.logger
import
init_logger
from
.interface
import
Platform
,
PlatformEnum
logger
=
init_logger
(
__name__
)
if
os
.
environ
.
get
(
"VLLM_WORKER_MULTIPROC_METHOD"
,
None
)
in
[
"fork"
,
None
]:
logger
.
warning
(
"`fork` method is not supported by ROCm. "
"VLLM_WORKER_MULTIPROC_METHOD is overridden to"
" `spawn` instead."
)
os
.
environ
[
"VLLM_WORKER_MULTIPROC_METHOD"
]
=
"spawn"
class
RocmPlatform
(
Platform
):
_enum
=
PlatformEnum
.
ROCM
...
...
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