MCPcopy Index your code
hub / github.com/pytorch/pytorch / run_fn

Method run_fn

caffe2/python/data_parallel_model_test.py:136–146  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

134
135 # Capture any exception thrown by the subprocess
136 def run_fn(*args, **kwargs):
137 try:
138 if device_option is None:
139 fn(*args, **kwargs)
140 workspace.ResetWorkspace()
141 else:
142 with core.DeviceScope(device_option):
143 fn(*args, **kwargs)
144 workspace.ResetWorkspace()
145 except Exception as ex:
146 queue.put(ex)
147
148 # Start N processes in the background
149 procs = []

Callers

nothing calls this directly

Calls 2

fnFunction · 0.50
putMethod · 0.45

Tested by

no test coverage detected