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

Function final_output

caffe2/python/task.py:401–409  ·  view source on GitHub ↗

Adds an output to the current Task, or if no task is active, create a dummy task that returns the given blob or record to the client. This will return the value of the blob or record when the last task of the TaskGroup for a given node finishes.

(blob_or_record)

Source from the content-addressed store, hash-verified

399
400
401def final_output(blob_or_record):
402 """
403 Adds an output to the current Task, or if no task is active,
404 create a dummy task that returns the given blob or record
405 to the client. This will return the value of the blob or record when
406 the last task of the TaskGroup for a given node finishes.
407 """
408 cur_task = Task.current(required=False) or Task()
409 return cur_task.add_output(blob_or_record)
410
411
412class TaskOutputList:

Callers 7

_actual_loopMethod · 0.90
test_net_multi_useMethod · 0.90
test_setupMethod · 0.90
test_multi_instanceMethod · 0.90
_timed_taskMethod · 0.90
example_taskFunction · 0.90
procMethod · 0.90

Calls 3

currentMethod · 0.80
add_outputMethod · 0.80
TaskClass · 0.70

Tested by 6

_actual_loopMethod · 0.72
test_net_multi_useMethod · 0.72
test_setupMethod · 0.72
test_multi_instanceMethod · 0.72
example_taskFunction · 0.72
procMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…