Support slimmable (SlimmableContainer) files in bench_a2_fast#286
Open
jfsantos wants to merge 1 commit into
Open
Support slimmable (SlimmableContainer) files in bench_a2_fast#286jfsantos wants to merge 1 commit into
jfsantos wants to merge 1 commit into
Conversation
A2 files are shipped as SlimmableContainer models bundling multiple standalone submodels (e.g. A2-Full at 8 channels and A2-Lite at 3). bench_a2_fast previously only accepted plain WaveNet files and bailed on these. Add a --slim V (0.0-1.0) option that resolves a SlimmableContainer to a single submodel using the same rule as ContainerModel::SetSlimmableSize (first submodel whose max_value exceeds V, else the last), then runs the existing fast-vs-generic comparison on that submodel's config + weights. Plain WaveNet files are unaffected (a --slim there just prints a note); omitting --slim on a container defaults to full size. No library changes: each container submodel is already a standalone a2-shaped WaveNet spec.
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.
What
bench_a2_fastpreviously only accepted plainWaveNet.namfiles and bailed on slimmable files. A2 models are shipped asSlimmableContainermodels that bundle multiple standalone submodels (e.g. A2-Full at 8 channels and A2-Lite at 3 channels), so they couldn't be benchmarked with this tool.This adds a
--slim V(0.0–1.0) option that resolves aSlimmableContainerto a single submodel using the same rule asContainerModel::SetSlimmableSize(first submodel whosemax_valueexceedsV, else the last), then runs the existing fast-vs-generic comparison on that submodel's config + weights.Notes
WaveNetfiles are unaffected — passing--slimthere just prints a note and benches normally.--slimon a container defaults to full size (last submodel).WaveNetspec, so it flows through the existing fast/generic paths directly.Testing
Ran against a real A2
SlimmableContainerfile:--slim 1.0→ submodel 1, A2 standard (8 ch), ~1.6× fast-vs-generic speedup--slim 0.2→ submodel 0, A2 nano (3 ch), ~6.5× fast-vs-generic speedup