Repository navigation
Add Python-driven native DXCGC perf backend for local MLIR - #1473
Conversation
This reverts commit 7a96277.
|
are we building a python binding dll ? |
|
xieofxie Yes. This builds winml-dxcgc-python.dll, a small C++ benchmark bridge loaded through Python ctypes, rather than a general Python binding for the DXCGC API. It exposes setup/ABI entry points and an in-process per-inference callback so the Python loop can measure input upload, GPU execution/wait, and output readback with caller-owned NumPy outputs. The bridge loads DXCGC DLLs from the installed windowsml package and is built separately from the Python wheel. The Runtime Offline implementation is unchanged. |
Zhipeng Wang (timenick)
left a comment
There was a problem hiding this comment.
Re-reviewed f94ea67. All four reported issues are addressed, with no additional actionable findings. Focused validation: 32 passed and 2 GPU-fixture tests skipped. Native GPU execution was not verified locally; some CI checks are still running.
🤖 Generated with Codex
This reverts commit 88563a0. Remove the later DXCGC-specific lowering test case alongside the reverted backend.
Add a native DXCGC backend for local MLIR using the installed Windows ML Runtime DLLs. CPU round-trip measurements include Python output allocation, input upload, GPU execution, completion and independent CPU output readback; compilation and disk I/O are excluded. Runtime Offline implementation is unchanged.
The native host now uses ABI 3 with per-call validated input pointers and fixed-resource command-list replay after the prior fence completes. GPU timestamp instrumentation is opt-in. A paired benchmark driver feeds identical pre-generated input sequences to Raw and Runtime Offline, alternates run order, records provenance, and checks final-output agreement. Supports --disable-d3d-mlir-programs.
Validation: native Release build and CTest; 25 focused Python tests passed (2 GPU-fixture tests skipped), Ruff and mypy passed. OneVisual with 110 changing inputs per round (10 warmup, 100 measured), three alternating rounds: median P50 Raw 5.708 ms vs Offline 6.870 ms; final-output cosine >0.999997 in all three rounds. This measures complete paths, not isolated API overhead; it does not replace historical report data.