mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
This reverts commit db3685a35c.
Reverted https://github.com/pytorch/pytorch/pull/143880 on behalf of https://github.com/huydhn due to Sorry for reverting your change, but either this PR or the base PR breaks distributed tests ([comment](https://github.com/pytorch/pytorch/pull/143880#issuecomment-2617743403))
24 lines
582 B
Python
24 lines
582 B
Python
import sys
|
|
from typing import Optional as _Optional, TYPE_CHECKING as _TYPE_CHECKING
|
|
|
|
|
|
if _TYPE_CHECKING:
|
|
from torch.serialization import LoadEndianness as _LoadEndianess
|
|
|
|
from torch.utils._config_module import install_config_module as _install_config_module
|
|
|
|
|
|
class load:
|
|
mmap: bool = False
|
|
endianness: _Optional["_LoadEndianess"] = None
|
|
# MAP_PRIVATE = 2
|
|
mmap_flags: _Optional[int] = None if sys.platform == "win32" else 2
|
|
|
|
|
|
class save:
|
|
compute_crc32: bool = True
|
|
use_pinned_memory_for_d2h: bool = False
|
|
|
|
|
|
_install_config_module(sys.modules[__name__])
|