Skip to content
Snippets Groups Projects
Commit dd848bc1 authored by François  LAURENT's avatar François LAURENT
Browse files

force deterministic cudnn to help the tests

parent 3e8bc2e6
Branches
Tags
No related merge requests found
......@@ -259,7 +259,8 @@ def enforce_reproducibility(generator=None):
seed = generator.initial_seed()
# see https://pytorch.org/docs/1.13/notes/randomness.html
torch.use_deterministic_algorithms(True)
# torch.backends.cudnn.deterministic = True
if torch.cuda.is_available:
torch.backends.cudnn.deterministic = True
torch.manual_seed(seed)
seed = seed % 2**32
np.random.seed(seed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment