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 -2
View File
@@ -14,6 +14,7 @@ from tests.v1.attention.utils import (
)
from vllm.config import ParallelConfig, SpeculativeConfig
from vllm.platforms import current_platform
from vllm.utils.torch_utils import set_random_seed
from vllm.v1.attention.backend import CommonAttentionMetadata
from vllm.v1.attention.backends.fa_utils import is_flash_attn_varlen_func_available
from vllm.v1.attention.backends.registry import AttentionBackendEnum
@@ -323,8 +324,7 @@ def forward_attention(
def test_tree_attn_correctness(
reference_backend: AttentionBackendEnum,
) -> None:
torch.manual_seed(42)
torch.cuda.manual_seed_all(42)
set_random_seed(42)
device = "cuda"
tree_attn_masks = {