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

Function _test_loop

caffe2/python/net_builder_test.py:34–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def _test_loop():
35 x = ops.Const(5)
36 y = ops.Const(0)
37 with ops.loop():
38 ops.stop_if(ops.EQ([x, ops.Const(0)]))
39 ops.Add([x, ops.Const(-1)], [x])
40 ops.Add([y, ops.Const(1)], [y])
41 return y
42
43
44def _test_inner_stop(x):

Callers 1

test_opsMethod · 0.85

Calls 4

ConstMethod · 0.80
loopMethod · 0.45
stop_ifMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…