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
+3 -2
View File
@@ -365,8 +365,9 @@ def set_random_seed(seed: int | None) -> None:
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed_all(seed)
from vllm.platforms import current_platform
current_platform.manual_seed_all(seed)
def create_kv_caches_with_random_flash(