tests: add dtype, golden output comparison and metrics to audio, embedding and diffuser nightly pipeline tests - #1258
Draft
quic-vishali wants to merge 2 commits into
Conversation
…ith dtype, golden output, and metrics
- Add FP16 export + compile tests for audio models (Whisper) and
audio-embedding models (Wav2Vec2) alongside existing FP32 configs
- Add golden output comparison: run PyTorch reference once, save to
golden_outputs/{category}.json; subsequent runs load and compare
QPC output against stored golden using MAD with tolerance
- Use nested artifact structure {model → dtype_key} to avoid key
collisions between FP32 and FP16 runs
- Fix pre_generate_utils to accept dtype_key and check nested artifact
structure correctly
- Add peak_ram_mb tracking via measure_peak_ram context manager for
entire export+compile run
- Fix whisper get_dummy_inputs to respect model torch_dtype instead of
hardcoding float32
Tests added per model type:
- test_export_compile / test_generate (FP32)
- test_export_compile_fp16 / test_generate_fp16 (FP16)
Golden output file structure (tests/nightly_pipeline/golden_outputs/):
audio_models.json:
{
"audio_models": {
"openai/whisper-tiny": {
"fp32_ctx_len32_<digest>": {
"pytorch_hf_tokens": [[...]],
"transcription": "Mr. Quilter is the apostle...",
"gen_len": 25,
"config_fp": "...pipeline_configs.json",
"timestamp": "2026-08-06T10:23:45"
}
}
}
}
Signed-off-by: Vishali Senthilkumar <vishsent@qti.qualcomm.com>
…pooling, golden output and metrics
Artifact structure (avoids key collisions across dtype × pooling):
{model_name → dtype_key → pooling_key → {onnx_path, qpc_path, ...}}
dtype_keys: fp32 | fp32_multiseqlen | fp16 | fp16_multiseqlen
pooling_keys: mean | max | cls | avg | None
Golden output file (golden_outputs/embedding_models.json):
{
"embedding_models": {
"BAAI/bge-base-en-v1.5": {
"fp32_poolingmean_seq_len32_<digest>": {
"pytorch_embeddings": [[...]],
"config_fp": "...pipeline_configs.json",
"timestamp": "2026-08-06T10:23:45"
}
}
}
}
Tests added (nightly, per model):
- test_export_compile / test_generate (FP32, seq_len=32)
- test_export_compile_multiseqlen / test_generate_multiseqlen (FP32, seq_len=[32,20])
- test_export_compile_fp16 / test_generate_fp16 (FP16, seq_len=32)
- test_export_compile_fp16_multiseqlen / test_generate_fp16_multiseqlen (FP16, seq_len=[32,20])
Signed-off-by: Vishali Senthilkumar <vishsent@qti.qualcomm.com>
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.
Summary
Refactors the nightly pipeline test infrastructure for audio, audio-embedding,
embedding and diffuser models