From 51fd482d6ec6b5c2540ac5209ff653974ed6cab6 Mon Sep 17 00:00:00 2001 From: Fanli Lin Date: Fri, 6 Dec 2024 23:38:59 +0800 Subject: [PATCH] [docs] update set-seed (#3228) * update set-seed * update comment --- docs/source/concept_guides/performance.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/concept_guides/performance.md b/docs/source/concept_guides/performance.md index b59bb2049a3..6e444fa17c4 100644 --- a/docs/source/concept_guides/performance.md +++ b/docs/source/concept_guides/performance.md @@ -43,13 +43,13 @@ Why is this important? Under the hood this will set **5** different seed setting random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) - torch.cuda.manual_seed_all(seed) + torch.cuda.manual_seed_all(seed) # or torch.xpu.manual_seed_all, etc # ^^ safe to call this function even if cuda is not available if is_torch_xla_available(): xm.set_rng_state(seed) ``` -The random state, numpy's state, torch, torch's cuda state, and if TPUs are available torch_xla's cuda state. +The random state, numpy's state, torch, torch's device state, and if TPUs are available torch_xla's cuda state. ## Observed Batch Sizes