This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Add support to compare by types and layers #302
Merged
Merged
Conversation
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
2398b7c
to
bc9b5db
Compare
6 tasks
bfineran
approved these changes
Apr 13, 2023
rahul-tuli
added a commit
that referenced
this pull request
Apr 18, 2023
* Feature: Add compare across types and layers * Renames: * sparsity --> sparsity_percent * quantized --> quantized_percent Update: Size calculation to include sparsity Add: __name__ to avoid using root logger Added: slight improvements to print messaging, and logs Style Updates * Rename: * _get_entries_to_compare --> _get_comparable_entries * Add: docstrings
rahul-tuli
added a commit
that referenced
this pull request
Apr 19, 2023
* Add:ModuleAnalysisSummary schema for easily displaying comparing summaries from ModelAnalysis Add: Tests for yaml serialization of the same * Move: yaml de-serialization methods to YAMLSerializableBaseModel * Style * Add: Tests for serialization, pretty printing, and subtraction * Get path programmatically * Add from_analysis method * Move relevant schemas to models.py Move ModelAnalysisSummary to analysis.py Moved analysis tests to a separate dir Remove extraneous test Simplify logic Move Summary generation to a separate class Delete old code * Fix failing tests * Update CLI * Update CLI * Add by_types info to analyze api (#292) * Add by types * Remove unintended changes * Style * Add kwargs * Fix failing tests * Fix failing test + `by-layers` * Add compare functionality * Add deprecation warning for `ModelAnalysis.pretty_print_summary(...)` Move pandas import within a pretty_print_summary(...) function that will be deprecated in a future version * Add `by-layers` support to analyze api(s) (#301) * Remove Not Implemented Error * Add: `by-layers` analysis Add: total property to `ZeroNonZeroParams` * Propagate `by-layers` to comparison summary * Rename: LINEAR_OP_TYPES --> TARGETED_LINEAR_OP_TYPES * BugFix: int32 was ignored from dense ops during analysis by types * Add support to compare by types and layers (#302) * Feature: Add compare across types and layers * Renames: * sparsity --> sparsity_percent * quantized --> quantized_percent Update: Size calculation to include sparsity Add: __name__ to avoid using root logger Added: slight improvements to print messaging, and logs Style Updates * Rename: * _get_entries_to_compare --> _get_comparable_entries * Add: docstrings * Add: Multiline row printing (#303) * Feature: Add compare across types and layers * Renames: * sparsity --> sparsity_percent * quantized --> quantized_percent Update: Size calculation to include sparsity Add: __name__ to avoid using root logger Added: slight improvements to print messaging, and logs Style Updates * Rename: * _get_entries_to_compare --> _get_comparable_entries * Add: docstrings * Add: Support to print multiline rows * Connect Deepsparse.Analyze (#304) * Feature: Add compare across types and layers * Renames: * sparsity --> sparsity_percent * quantized --> quantized_percent Update: Size calculation to include sparsity Add: __name__ to avoid using root logger Added: slight improvements to print messaging, and logs Style Updates * Rename: * _get_entries_to_compare --> _get_comparable_entries * Add: docstrings * Add: Support to print multiline rows * Connect deepsparse.analyze to sparsezoo.analyze Add: PerformanceEntry to entry types, else it will be converted to a ModelEntry Fix: model_name while instantiating PerformanceEntry * Add: supported_graph_percentage to BenchmarkResult * Add node level timings * Style
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR majorly enables comparison across common layers and types,
before this comparison was only done at model level
This also does some rename(s):
sparsity
-->sparsity_percent
quantized
-->quantized_percent
Slightly improves the logging and print messaging
Additionally adds docstrings to added functions
For the following manual test:
rs-pr-95-uni-q.onnx
is fromzoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95_uniform_quant-none
rs-pr95-q.onnx
is fromzoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95_quant-none