Skip quantized recipe variants for unquantized-track EPs (VitisAI) - #1226
Merged
Conversation
The eval harness runs VitisAI on the unquantized model: _resolve_precision drops any explicit precision and both winml config and winml build receive --no-quant. That policy only covered the winml-config fallback path. In _build_jobs the quantized-variant filter was gated on `not npu`, so on NPU an authored recipe such as openai/clip-vit-base-patch32 feature-extraction_w8a16_config.json was still scheduled, and _run_recipe_build cannot suppress it because the recipe config carries its own quant section that --no-quant does not override. The resulting w8a16 QDQ graph is handed to AMD_AIE2P, which partitions the quantize/dequantize and const-fix ops back to CPU and then aborts inside xir (attrs_imp.cpp: Attrs doesn't contain attribute data), failing the job as UNKNOWN. Filter quantized recipe variants for skip-quant EPs as well. When that leaves no variant, the model falls through to the single unquantized winml-config fallback.
xieofxie
approved these changes
Jul 28, 2026
DingmaomaoBJTU
approved these changes
Jul 28, 2026
DingmaomaoBJTU
left a comment
Collaborator
There was a problem hiding this comment.
LGTM — clean, focused change. The logic generalization from not npu to not npu or skip_quant is correct and well-tested. Minor nit: the one-line docstring still says 'quant is NPU-only' which could be updated to reflect the new behavior, but not blocking.
DingmaomaoBJTU
approved these changes
Jul 28, 2026
DingmaomaoBJTU
left a comment
Collaborator
There was a problem hiding this comment.
LGTM — clean, focused change. The logic generalization from not npu to not npu or skip_quant is correct and well-tested. Minor nit: the one-line docstring still says 'quant is NPU-only' which could be updated to reflect the new behavior, but not blocking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
vitisai_npue2e eval leg fails onopenai/clip-vit-base-patch32/feature-extraction:A
w8a16job should never have been scheduled for VitisAI in the first place.Root cause
The harness evaluates VitisAI on the unquantized model (
_EPS_SKIP_WINML_QUANT):_resolve_precisiondrops any explicit precision, and bothwinml configandwinml buildreceive--no-quant. That policy only covered thewinml configfallback path.In
_build_jobsthe quantized-variant filter was gated onnot npu, so on NPU an authored recipe variant (examples/recipes/openai_clip-vit-base-patch32/feature-extraction_w8a16_config.json,weight_type: uint8/activation_type: uint16) was still expanded into a job._run_recipe_buildcannot suppress it either — a recipe config carries its ownquantsection, which--no-quantdoes not override.The resulting
w8a16QDQ graph is then handed toAMD_AIE2P_4x8_CMC_Overlay. VitisAI quantizes internally (XINT8) and is not meant to consume a winml-producedw8a16QDQ graph: it partitions the quantize/dequantize and const-fix ops back to CPU and then aborts inside xir, killing the process — hence theUNKNOWNclassification rather than a normal failure.Change
_build_jobs: filter quantized recipe variants for skip-quant EPs as well (if not npu or skip_quant). When that leaves no variant, the model falls through to the existing single unquantizedwinml configfallback._EPS_SKIP_WINML_QUANTcomment andscripts/e2e_eval/README.mdupdated to state the rule.fp16+w8a16recipe keeps onlyfp16on VitisAI; aw8a16-only recipe falls back to the unquantizedwinml configjob.Every recipe directory under
examples/recipes/has anfp16variant, so no model loses all of its jobs.