vllm.distributed.ec_transfer.ec_connector.cpu.control.zmq
¶
ZMQ control-plane implementations for ECCPUConnector.
ZmqClientConnection — one DEALER socket to a single producer peer. ZmqClientTransport — pool of ZmqClientConnection objects (consumer side). ZmqServerTransport — ROUTER socket (producer side).
Classes:
-
ZmqClientConnection–One DEALER socket to one producer peer.
-
ZmqClientTransport–Pool of ZmqClientConnection objects — one per producer peer.
-
ZmqServerTransport–ROUTER socket for the producer side. Byte-level only, driven by
ZmqClientConnection
dataclass
¶
Bases: ControlConnection
One DEALER socket to one producer peer.
Owns the socket and its optional monitor socket. NIXL state is NOT stored here — it belongs in ECSession above this layer.
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
ZmqClientTransport
¶
Pool of ZmqClientConnection objects — one per producer peer.
Creates DEALER sockets lazily on first contact. Does not touch NIXL; NIXL registration is handled by ECCPUConsumer once an XferAck arrives.
Methods:
-
connect–Return the existing connection for addr, or create a new one.
-
poll–Non-blocking drain of messages from every peer's DEALER.
-
poll_dead–Non-blocking sweep of peer monitors; return addresses that died.
-
remove–Remove and close the connection for addr, returning it (or None).
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
connect(addr)
¶
Return the existing connection for addr, or create a new one.
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
poll()
¶
Non-blocking drain of messages from every peer's DEALER.
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
poll_dead()
¶
Non-blocking sweep of peer monitors; return addresses that died.
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
remove(addr)
¶
Remove and close the connection for addr, returning it (or None).
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
ZmqServerTransport
¶
ROUTER socket for the producer side. Byte-level only, driven by ProducerSession.
poll(timeout_ms) waits up to timeout_ms for messages, then drains all that are available; timeout_ms=0 drains whatever has already arrived. send() routes a reply back to a specific peer by ZMQ identity.
Methods:
-
poll–Wait up to timeout_ms for incoming messages, then drain all pending.
-
send–Send a reply payload to the peer identified by ZMQ identity.
Attributes:
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | |
port
property
¶
Return the actual bound port, including when port 0 was requested.
poll(timeout_ms=0)
¶
Wait up to timeout_ms for incoming messages, then drain all pending.
Returns a list of (identity, payload) pairs.
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/control/zmq.py
send(identity, payload)
¶
Send a reply payload to the peer identified by ZMQ identity.