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

Method AddStep

caffe2/python/core.py:2911–2921  ·  view source on GitHub ↗
(self, step)

Source from the content-addressed store, hash-verified

2909 return list(self._net_dict.values())
2910
2911 def AddStep(self, step):
2912 assert isinstance(step, ExecutionStep)
2913 step._notify_is_used()
2914 if not step.HasNets() and not step.HasSubsteps():
2915 return
2916 self._plan.execution_step.add().CopyFrom(step.Proto())
2917 self._steps.append(step)
2918 # nets need to be added to the plan in order of usage
2919 net_list = []
2920 add_nets_in_order(step, net_list)
2921 self.AddNets([step.get_net(n) for n in net_list])
2922
2923 def Steps(self):
2924 return self._steps

Callers 15

benchmarkFunction · 0.95
benchmarkFunction · 0.95
__init__Method · 0.95
create_from_protoMethod · 0.95
testRunPlanMethod · 0.95
test_plan_runMethod · 0.95
test_opsMethod · 0.95
test_if_netMethod · 0.95
test_while_netMethod · 0.95
analyze_taskFunction · 0.95

Calls 10

AddNetsMethod · 0.95
isinstanceFunction · 0.85
add_nets_in_orderFunction · 0.85
_notify_is_usedMethod · 0.80
HasNetsMethod · 0.80
HasSubstepsMethod · 0.80
get_netMethod · 0.80
addMethod · 0.45
ProtoMethod · 0.45
appendMethod · 0.45

Tested by 15

benchmarkFunction · 0.76
benchmarkFunction · 0.76
testRunPlanMethod · 0.76
test_plan_runMethod · 0.76
test_opsMethod · 0.76
test_if_netMethod · 0.76
test_while_netMethod · 0.76
testToyRegressionMethod · 0.76
BuildAndRunPlanMethod · 0.76
test_last_n_windowsMethod · 0.76