Fix Qwen3 genai bundle component builds - #1248
Conversation
8fc63fa to
ceed825
Compare
Preserve quantization when raw graphs skip ORT optimization, and make genai bundle assembly use private artifact builds so bundle export does not create runtime sessions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ceed825 to
e176488
Compare
xieofxie
left a comment
There was a problem hiding this comment.
Two correctness issues need to be addressed before merge: the Qwen skip-optimization setting is discarded during config assembly, and skip_optimize incorrectly suppresses explicit quantization.
|
Heads-up on the It does not stop the native catalog release from running at shutdown.
So removing the MeasuredFull
Every test passes in both cases; the process then dies during shutdown, 1.0s The fault site itself, disassembled at RVA +0x026f2 mov rax, qword ptr [rdx] ; load vtable -- this one is fine
+0x026f5 mov rax, qword ptr [rax + 0x10] ; vtable[2] = IUnknown::Release <-- AV
+0x026f9 jmp <Release thunk>A The same call also has a second failure mode: it can block forever instead of Which of the two you get depends on how far native teardown has progressed, so SuggestionIf the intent is to stop the release at shutdown, clearing the handle is what catalog._handle = NoneThat disarms Also worth noting: Happy to share the raw logs / WER records if useful. |
|
Handled in 749f024 by registering an atexit cleanup that only disarms the cached WinML catalog handle ( |
xieofxie
left a comment
There was a problem hiding this comment.
Re-reviewed the latest head. The registered skip_optimize value now survives config assembly, quantization is based on actual ONNX graph state rather than skip_optimize, and regression tests cover both paths. No remaining issues found.
Summary
Validation
uv run ruff check src\winml\modelkit\build\common.py src\winml\modelkit\commands\build.py src\winml\modelkit\config\build.py src\winml\modelkit\models\auto.py src\winml\modelkit\models\winml\composite_model.py src\winml\modelkit\models\winml\genai_bundle.py src\winml\modelkit\models\hf\qwen3\qwen_transformer_only.py tests\unit\build\test_hf.py tests\unit\build\test_onnx.py tests\unit\commands\test_build.py tests\unit\models\auto\test_from_pretrained_ep.py tests\unit\models\qwen3\test_qwen3_modeling.py tests\unit\models\winml\test_genai_bundle_orchestrator.pyuv run pytest tests\unit\build\test_hf.py tests\unit\build\test_onnx.py tests\unit\commands\test_build.py tests\unit\models\auto\test_from_pretrained_ep.py tests\unit\models\qwen3\test_qwen3_modeling.py tests\unit\models\winml\test_genai_bundle_orchestrator.pyQwen/Qwen3-0.6Bwith--export-type optimized --ep qnn --device npu --rebuildexits0and produces matching bundle hashes.