mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Fixes #155017 Pull Request resolved: https://github.com/pytorch/pytorch/pull/155298 Approved by: https://github.com/svekars Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
30 lines
1.0 KiB
Markdown
30 lines
1.0 KiB
Markdown
# torch.utils.deterministic
|
|
|
|
```{eval-rst}
|
|
.. py:module:: torch.utils.deterministic
|
|
.. currentmodule:: torch.utils.deterministic
|
|
|
|
.. attribute:: fill_uninitialized_memory
|
|
|
|
A :class:`bool` that, if True, causes uninitialized memory to be filled with
|
|
a known value when :meth:`torch.use_deterministic_algorithms()` is set to
|
|
``True``. Floating point and complex values are set to NaN, and integer
|
|
values are set to the maximum value.
|
|
|
|
Default: ``True``
|
|
|
|
Filling uninitialized memory is detrimental to performance. So if your
|
|
program is valid and does not use uninitialized memory as the input to an
|
|
operation, then this setting can be turned off for better performance and
|
|
still be deterministic.
|
|
|
|
The following operations will fill uninitialized memory when this setting is
|
|
turned on:
|
|
|
|
* :func:`torch.Tensor.resize_` when called with a tensor that is not
|
|
quantized
|
|
* :func:`torch.empty`
|
|
* :func:`torch.empty_strided`
|
|
* :func:`torch.empty_permuted`
|
|
* :func:`torch.empty_like`
|
|
``` |