/usr/local/lib64/python3.6/site-packages/torch
NameSizeModeActions
ao/-0755rm
autograd/-0755rm
backends/-0755rm
bin/-0755rm
contrib/-0755rm
cpu/-0755rm
cuda/-0755rm
distributed/-0755rm
distributions/-0755rm
fft/-0755rm
for_onnx/-0755rm
futures/-0755rm
fx/-0755rm
include/-0755rm
jit/-0755rm
lib/-0755rm
linalg/-0755rm
multiprocessing/-0755rm
nn/-0755rm
onnx/-0755rm
optim/-0755rm
package/-0755rm
profiler/-0755rm
quantization/-0755rm
share/-0755rm
sparse/-0755rm
special/-0755rm
testing/-0755rm
utils/-0755rm
_C/-0755rm
__pycache__/-0755rm
autocast_mode.py96630644editdlrm
functional.py712570644editdlrm
hub.py233710644editdlrm
overrides.py841460644editdlrm
py.typed00644editdlrm
quasirandom.py74890644editdlrm
random.py48280644editdlrm
serialization.py365440644editdlrm
storage.py57620644editdlrm
torch_version.py34680644editdlrm
types.py15520644editdlrm
version.py1250644editdlrm
_appdirs.py262450644editdlrm
_C.cpython-36m-x86_64-linux-gnu.so292960755editdlrm
_classes.py17170644editdlrm
_deploy.py31000644editdlrm
_dl.cpython-36m-x86_64-linux-gnu.so298320755editdlrm
_jit_internal.py469100644editdlrm
_linalg_utils.py23730644editdlrm
_lobpcg.py440760644editdlrm
_lowrank.py110310644editdlrm
_namedtensor_internals.py53510644editdlrm
_ops.py44570644editdlrm
_python_dispatcher.py70110644editdlrm
_six.py18580644editdlrm
_sources.py38820644editdlrm
_storage_docs.py12980644editdlrm
_tensor.py508540644editdlrm
_tensor_docs.py1134740644editdlrm
_tensor_str.py180910644editdlrm
_torch_docs.py3646780644editdlrm
_utils.py216170644editdlrm
_utils_internal.py16870644editdlrm
_VF.py6560644editdlrm
_vmap_internals.py132190644editdlrm
__config__.py5510644editdlrm
__future__.py8130644editdlrm
__init__.py311990644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/_utils_internal.py (1687B)
import os import sys import tempfile # this arbitrary-looking assortment of functionality is provided here # to have a central place for overrideable behavior. The motivating # use is the FB build environment, where this source file is replaced # by an equivalent. if sys.executable == 'torch_deploy': # __file__ is meaningless in the context of frozen torch used in torch deploy. # setting empty torch_parent should allow below functions to operate without crashing, # but it's unclear if there is a valid use case for them in the context of deploy. torch_parent = "" else: if os.path.basename(os.path.dirname(__file__)) == 'shared': torch_parent = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) else: torch_parent = os.path.dirname(os.path.dirname(__file__)) def get_file_path(*path_components: str) -> str: return os.path.join(torch_parent, *path_components) def get_file_path_2(*path_components: str) -> str: return os.path.join(*path_components) def get_writable_path(path: str) -> str: if os.access(path, os.W_OK): return path return tempfile.mkdtemp(suffix=os.path.basename(path)) def prepare_multiprocessing_environment(path: str) -> None: pass def resolve_library_path(path: str) -> str: return os.path.realpath(path) TEST_MASTER_ADDR = '127.0.0.1' TEST_MASTER_PORT = 29500 # USE_GLOBAL_DEPS controls whether __init__.py tries to load # libtorch_global_deps, see Note [Global dependencies] USE_GLOBAL_DEPS = True # USE_RTLD_GLOBAL_WITH_LIBTORCH controls whether __init__.py tries to load # _C.so with RTLD_GLOBAL during the call to dlopen. USE_RTLD_GLOBAL_WITH_LIBTORCH = False