[Tests] Standardize RNG seed utility across test files (#32982)
Signed-off-by: 7. Sun <jhao.sun@gmail.com>
This commit is contained in:
@@ -333,6 +333,8 @@ 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)
|
||||
|
||||
|
||||
def create_kv_caches_with_random_flash(
|
||||
|
||||
Reference in New Issue
Block a user