torch.use_deterministic_algorithms
torch.use_deterministic_algorithms(mode, *, warn_only=False)
Sets whether PyTorch operations must use "deterministic"
   algorithms. That is, algorithms which, given the same input, and
   when run on the same software and hardware, always produce the same
   output. When enabled, operations will use deterministic algorithms
   when available, and if only nondeterministic algorithms are
   available they will throw a "RuntimeError" when called.
Note:
 This setting alone is not always enough to make an application
 reproducible. Refer to Reproducibility for more information.

Note:
 "torch.set_deterministic_debug_mode()" offers an alternative
 interface for this feature.

The following normally-nondeterministic operations will act
   deterministically when "mode=True":
  * "torch.nn.Conv1d" when called on CUDA tensor

  * "torch.nn.Conv2d" when called on CUDA tensor
