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

Method task_instance_exit

caffe2/python/net_builder.py:422–432  ·  view source on GitHub ↗

Defines operations that will be executed once at shutdown of each instance of a task. This can be seen as "thread_local" finalization. This shutdown will be run concurrently for each instance of a task. For global task shutdown, use `task_exit` instead.

(self)

Source from the content-addressed store, hash-verified

420 return setup
421
422 def task_instance_exit(self):
423 """
424 Defines operations that will be executed once at shutdown of each
425 instance of a task. This can be seen as "thread_local" finalization.
426
427 This shutdown will be run concurrently for each instance of a task.
428 For global task shutdown, use `task_exit` instead.
429 """
430 setup = _SetupBuilder(_SetupBuilder.EXIT)
431 self.net().add_attribute(Task.TASK_INSTANCE_SETUP, setup)
432 return setup
433
434 def local_init(self):
435 """

Callers 4

test_multi_instanceMethod · 0.80
_runtime_threads_taskFunction · 0.80
procMethod · 0.80

Calls 3

netMethod · 0.95
_SetupBuilderClass · 0.85
add_attributeMethod · 0.80

Tested by 3

test_multi_instanceMethod · 0.64
procMethod · 0.64