• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1torch.utils.deterministic
2=========================
3.. py:module:: torch.utils.deterministic
4.. currentmodule:: torch.utils.deterministic
5
6.. attribute:: fill_uninitialized_memory
7
8    A :class:`bool` that, if True, causes uninitialized memory to be filled with
9    a known value when :meth:`torch.use_deterministic_algorithms()` is set to
10    ``True``. Floating point and complex values are set to NaN, and integer
11    values are set to the maximum value.
12
13    Default: ``True``
14
15    Filling uninitialized memory is detrimental to performance. So if your
16    program is valid and does not use uninitialized memory as the input to an
17    operation, then this setting can be turned off for better performance and
18    still be deterministic.
19
20    The following operations will fill uninitialized memory when this setting is
21    turned on:
22
23        * :func:`torch.Tensor.resize_` when called with a tensor that is not
24          quantized
25        * :func:`torch.empty`
26        * :func:`torch.empty_strided`
27        * :func:`torch.empty_permuted`
28        * :func:`torch.empty_like`