mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: This PR * adds the breakpad build to most of the remaining docker images (except the mobile + slim ones) * pins to a [fork of breakpad](https://github.com/google/breakpad/compare/master...driazati:master?expand=1) to enable dasiy chaining on signal handlers * renames the API to be nicer Pull Request resolved: https://github.com/pytorch/pytorch/pull/59236 Reviewed By: malfet Differential Revision: D28792511 Pulled By: driazati fbshipit-source-id: 83723e74b7f0a00e1695210ac2620a0c91ab4bf2
18 lines
635 B
Python
18 lines
635 B
Python
import os.path as _osp
|
|
import sys
|
|
|
|
from .throughput_benchmark import ThroughputBenchmark
|
|
from ._crash_handler import enable_minidumps, disable_minidumps, enable_minidumps_on_exceptions
|
|
|
|
# Set the module for a given object for nicer printing
|
|
def set_module(obj, mod):
|
|
if not isinstance(mod, str):
|
|
raise TypeError("The mod argument should be a string")
|
|
obj.__module__ = mod
|
|
|
|
if sys.executable == "torch_deploy":
|
|
# not valid inside torch_deploy interpreter, no paths exists for frozen modules
|
|
cmake_prefix_path = None
|
|
else:
|
|
cmake_prefix_path = _osp.join(_osp.dirname(_osp.dirname(__file__)), 'share', 'cmake')
|