[edge-infer] vllm_omni.windows: host-OS compatibility plugin for native Windows
One package that makes the POSIX assumptions measured in W0-W8 hold in every process vLLM / vLLM-Omni starts, and reports what it did: - provides fcntl (flock/lockf on msvcrt.locking; LOCK_SH served as exclusive) and uvloop (asyncio.run on a selector loop) when absent; - installs WindowsSelectorEventLoopPolicy and a signal.signal fallback for loop.add_signal_handler on the Windows loop classes; - replaces whole vLLM's get_open_zmq_ipc_path / find_loaded_library when the wheel lacks the branch patch and the upstream body hash is known; - verifies the wheel-only sites (sentinel poll, int64 seed) and reports wheel_required at the exact site instead of failing downstream; - shm_dir() replaces the /dev/shm literals; os.geteuid provided. Activated from vllm_omni/patch.py and as vllm.general_plugins / vllm_omni.general_plugins entry points (idempotent; no-op off Windows). prints the audit; the M0 placement report embeds it. 16 Linux tests through injected primitives. Design: analysis/design_windows_compat_plugin_20260921.md Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
97d97b6503
commit
00510ce38b
15 files changed
+1050
-2
No files matched your search
@@ -114,6 +114,18 @@ def _host_kind() -> str:
|
||||
return "linux"
|
||||
|
||||
|
||||
def _host_compat_report() -> dict[str, Any] | None:
|
||||
"""``vllm_omni.windows.report()`` on Windows, so a record says what made the run possible."""
|
||||
from vllm_omni.windows import is_windows, report
|
||||
|
||||
if not is_windows():
|
||||
return None
|
||||
try:
|
||||
return report()
|
||||
except Exception as exc: # the audit must never take the engine down
|
||||
return {"error": f"{type(exc).__name__}: {exc}"}
|
||||
|
||||
|
||||
def gpu_attribution_for_tree() -> dict[str, Any]:
|
||||
"""Try to attribute GPU bytes to this process tree, and say why when it fails.
|
||||
|
||||
@@ -765,6 +777,9 @@ class LocalTextEngine:
|
||||
"tree_rss_delta_at_load": self.load_memory.get("tree_rss_delta"),
|
||||
**gpu_attribution_for_tree(),
|
||||
},
|
||||
# [edge-infer] On native Windows, which compatibility layer carried this
|
||||
# process (shims, patches, wheel-provided sites). None elsewhere.
|
||||
"host_compat": _host_compat_report(),
|
||||
}
|
||||
|
||||
def report_usage(self) -> dict[str, Any]:
|
||||
|
||||
Reference in new issue
Block a user