Skip to main content

Module peer_class

Module peer_class 

Source
Expand description

Peer-class metadata for partitioning by “what kind of Node does this op run on.” PEER_CLASS_KEY tags Output<PeerId> producers; HOME_CLASS_KEY tags each NodeProto with the class of Node it runs on (stamped by infer_peer_classes).

Constants§

HOME_CLASS_KEY
Class of Node a NodeProto runs on. Stamped by infer_peer_classes; partition keys + cross-class detection consume it.
PEER_CLASS_KEY
Class of peer an Output<PeerId> producer yields. Stamped on ValueInfoProto (Graph::input) or NodeProto (frontend).
SELF_CLASS
Sentinel for ops whose data inputs all originate on the local Node. Function inputs start here; wire.Send re-homes downstream.

Functions§

home_class_of_node
Read home_class off a NodeProto. None for unvisited nodes; partition falls back to SELF_CLASS.
peer_class_of_node
Read peer_class off a NodeProto. None if absent.
peer_class_of_value_info
Read peer_class off a ValueInfoProto. None if absent.