Add platform manual_seed_all API (#38468)

Signed-off-by: Yan Ma <yan.ma@intel.com>
This commit is contained in:
Yan Ma
2026-04-10 13:43:50 +08:00
committed by GitHub
parent 13e6b1b908
commit ec68d53b2b
18 changed files with 57 additions and 44 deletions
+2 -3
View File
@@ -7,6 +7,7 @@ import vllm._custom_ops as ops
from tests.kernels.utils import opcheck
from vllm.model_executor.layers.activation import SiluAndMul
from vllm.platforms import current_platform
from vllm.utils.torch_utils import set_random_seed
DTYPES = [torch.bfloat16, torch.float16]
QUANT_DTYPES = [current_platform.fp8_dtype()]
@@ -49,9 +50,7 @@ def test_silu_and_mul(
seed: int,
device: str,
) -> None:
torch.random.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed(seed)
set_random_seed(seed)
torch.set_default_device(device)
layer = SiluAndMul()