Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion vllm_spyre/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
VLLM_SPYRE_WORKER_LOG_REDIRECT_DIR: str = ""
VLLM_SPYRE_GLOO_TIMEOUT_MINUTES: int = 60
VLLM_SPYRE_REQUIRE_PRECOMPILED_DECODERS: bool = False
VLLM_SPYRE_SIMPLE_COMPILE_BACKEND: str = "eager"

logger = init_logger(__name__)

Expand Down Expand Up @@ -143,7 +144,14 @@ def _backend_backwards_compat() -> str:
# disable compilation for decoders
"VLLM_SPYRE_REQUIRE_PRECOMPILED_DECODERS":
lambda: bool(int(os.getenv("VLLM_SPYRE_REQUIRE_PRECOMPILED_DECODERS", "0"))
)
),

# Simple compile backend for some dynamically compiled operations, like
# gathering logprobs in the sampler.
# Defaults to eager, iductor can be used if python headers and a compiler
# are available.
"VLLM_SPYRE_SIMPLE_COMPILE_BACKEND":
lambda: os.getenv("VLLM_SPYRE_SIMPLE_COMPILE_BACKEND", "eager"),
}
# --8<-- [end:env-vars-definition]

Expand Down
4 changes: 2 additions & 2 deletions vllm_spyre/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class SpyrePlatform(Platform):
_num_spyre_blocks_override: int = -1 # override num of KV cache blocks
_config: VllmConfig = None

# TODO: see if this needs to be set
# Backend for dynamic compilation ops
# See vllm batched_count_greater_than method
# simple_compile_backend: str = "eager"
simple_compile_backend: str = envs_spyre.VLLM_SPYRE_SIMPLE_COMPILE_BACKEND

# Needed by vllm/model_executor/layers/pooler.py:562
current_stream = lambda _: _StreamPlaceholder()
Expand Down