The send and return nodes are added only to the schedule on the first attempt to execute the schedule on a call tf.Session.run()... and, indeed, the set of send and recv nodes to add will depend on the specific tensors that you submit and select in this call.
, , , tf.RunOptions(output_partition_graphs=True) Session.run() :
options = tf.RunOptions(output_partition_graphs=True)
metadata = tf.RunMetadata()
sess.run(..., options=options, metadata=metadata)
for partition_graph_def in metadata.partition_graphs:
print partition_graph_def