Integrate portable edge graph backends with Omni runtime
Extract versioned stage contracts, model shared CPU/iGPU/NPU memory constraints, and add explicit graph routes, reservations, output acknowledgements, and worker retirement. Fix native Windows shared-buffer lifetime and host paths. Document qualified hardware paths and remaining rollout gates.
This commit is contained in:
1 parent
00510ce38b
commit
723c550209
55 files changed
+2900
-383
No files matched your search
+29
-5
@@ -16,9 +16,7 @@ from vllm_omni.edge.local.external import protocol
|
||||
def _round_trip(op, body=None, tensors=None):
|
||||
near, far = socket.socketpair()
|
||||
try:
|
||||
threading.Thread(
|
||||
target=lambda: protocol.send_message(near, op, body, tensors), daemon=True
|
||||
).start()
|
||||
threading.Thread(target=lambda: protocol.send_message(near, op, body, tensors), daemon=True).start()
|
||||
return protocol.recv_message(far)
|
||||
finally:
|
||||
near.close()
|
||||
@@ -66,8 +64,7 @@ def test_empty_message_and_no_tensors():
|
||||
|
||||
def test_error_reply_raises_with_remote_detail():
|
||||
with pytest.raises(protocol.WorkerError) as excinfo:
|
||||
_round_trip(protocol.OP_ERR, {"message": "boom", "code": "ValueError",
|
||||
"traceback": "far side traceback"})
|
||||
_round_trip(protocol.OP_ERR, {"message": "boom", "code": "ValueError", "traceback": "far side traceback"})
|
||||
assert excinfo.value.code == "ValueError"
|
||||
assert "far side traceback" in excinfo.value.remote_traceback
|
||||
|
||||
@@ -92,3 +89,30 @@ def test_oversized_header_is_refused_before_allocation():
|
||||
finally:
|
||||
near.close()
|
||||
far.close()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"override",
|
||||
[
|
||||
{"version": 2},
|
||||
{"version": True},
|
||||
{"required_features": ["unknown-required-feature"]},
|
||||
{"tensors": [{"name": "x", "dtype": "<f4", "shape": [2], "nbytes": 1}]},
|
||||
{"tensors": [{"name": "x", "dtype": "|O", "shape": [1], "nbytes": 8}]},
|
||||
{"tensors": [{"name": "x", "dtype": "<f4", "shape": [-1], "nbytes": -4}]},
|
||||
],
|
||||
)
|
||||
def test_invalid_frame_refused_without_reading_payload(override):
|
||||
import json
|
||||
import struct
|
||||
|
||||
near, far = socket.socketpair()
|
||||
far.settimeout(0.2)
|
||||
try:
|
||||
header = json.dumps({"version": 1, "op": "run", "body": {}, "tensors": [], **override}).encode()
|
||||
near.sendall(struct.pack(">I", len(header)) + header)
|
||||
with pytest.raises(protocol.ProtocolError):
|
||||
protocol.recv_message(far)
|
||||
finally:
|
||||
near.close()
|
||||
far.close()
|
||||
Reference in new issue
Block a user