MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testNesting

Method testNesting

tensorflow/python/framework/ops_test.py:1487–1502  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1485 """, gd)
1486
1487 def testNesting(self):
1488 g = ops.Graph()
1489 with g.device("/job:worker/replica:2"):
1490 g.create_op("FloatOutput", [], [dtypes.float32])
1491 with g.device("/job:worker/replica:3/task:0"):
1492 g.create_op("FloatOutput", [], [dtypes.float32])
1493 g.create_op("FloatOutput", [], [dtypes.float32])
1494 gd = g.as_graph_def()
1495 self.assertProtoEqualsVersion("""
1496 node { name: "FloatOutput" op: "FloatOutput"
1497 device: "/job:worker/replica:2" }
1498 node { name: "FloatOutput_1" op: "FloatOutput"
1499 device: "/job:worker/replica:3/task:0" }
1500 node { name: "FloatOutput_2" op: "FloatOutput"
1501 device: "/job:worker/replica:2" }
1502 """, gd)
1503
1504 def testNestingString(self):
1505 g = ops.Graph()

Callers

nothing calls this directly

Calls 5

deviceMethod · 0.95
create_opMethod · 0.95
as_graph_defMethod · 0.95
GraphMethod · 0.45

Tested by

no test coverage detected