Python comparison scripts for test suite output (diff_test_runs)#2822
Open
ppenenko wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Open
Python comparison scripts for test suite output (diff_test_runs)#2822ppenenko wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
ppenenko wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
New Python package under python/MaterialXTest/diff_test_runs/ with three scripts for comparing pairs of test suite output directories: - diff_images.py: Perceptual image comparison using NVIDIA FLIP, with HTML side-by-side reports - diff_traces.py: Perfetto trace comparison with per-material CPU slice and GPU render-time analysis, inline SVG charts - diff_shaders.py: Offline shader analysis (line count, SPIR-V binary size, compile time) using Vulkan SDK tools - _report.py: Shared utilities for comparison tables, SVG chart generation, and HTML report building
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
A new Python package under
python/MaterialXTest/diff_test_runs/provides three scripts for comparing pairs of MaterialX test suite output directories (baseline vs. optimized). The trace comparison script (diff_traces.py) consumes the Perfetto traces and GPU track events produced by the tracing instrumentation from #2742.diff_images.pydiff_traces.py--slicefilters,--warmup-framesburn-in period, inline SVG charts in HTML reports, e.g.diff_shaders.pyglslangValidatorcompile time,spirv-optoptimization time; auto-discovers Vulkan SDK tools inPATH, e.g._report.pyKey features:
--min-delta-ms,--min-delta-pct) to focus on significant changes--warmup-frames) to discard initial GPU frames for more stable averagesMotivation
This tooling was developed to measure and validate shader generation optimizations (early lobe pruning, dead code elimination) in a companion branch. The infrastructure is generally useful for:
Test plan
diff_traces.pycorrectly processes Perfetto traces with CPU slices and GPU async track eventsdiff_images.pyproduces FLIP-based perceptual difference reportsdiff_shaders.pycompiles dumped GLSL to SPIR-V and reports LOC/size/timing deltasRelated