Unverified Commit 700a1ddc authored by Martin Hickey's avatar Martin Hickey Committed by GitHub
Browse files

[Misc] Use envs module to get VLLM_DISABLED_KERNELS (#35776)


Signed-off-by: default avatarMartin Hickey <martin.hickey@ie.ibm.com>
parent f33251ff
......@@ -13,7 +13,6 @@ or kernel implementation, add it to this __init__.py to maintain
import stability.
"""
import os
from typing import TypeVar
import torch
......@@ -154,8 +153,7 @@ _KernelConfigT = TypeVar("_KernelConfigT", bound=ScaledMMLinearLayerConfig)
def is_supported_and_can_implement_kernel(
kernel: type[_KernelT], config: _KernelConfigT, compute_capability: int | None
) -> tuple[bool, str]:
# TODO: Fetch `VLLM_DISABLED_KERNELS` from vllm.envs instead.
if kernel.__name__ in os.environ.get("VLLM_DISABLED_KERNELS", "").split(","):
if kernel.__name__ in envs.VLLM_DISABLED_KERNELS:
return False, f" {kernel.__name__} is disabled by environment variable"
if compute_capability is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment