-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: Analyze api, add DataStructures for summary #288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comments, nice job overall, the framework looks very flexible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the subtraction logic looks very solid. I think either more thorough testing of the subtraction functionality or inclusion of a printed example in the PR description would assure more coverage for this functionality, but will leave it to your discretion
…aries from ModelAnalysis Add: Tests for yaml serialization of the same
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
* Add by types * Remove unintended changes
Move pandas import within a pretty_print_summary(...) function that will be deprecated in a future version
* 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
* 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
* 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
* 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
The Description has been updated with latest output after all PRs were merged into this feature branch; the compare functionality here invokes the |
6402079
to
2e3bd08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the description. It was really interesting looking through the difference printout between the two resnet models - even more excited about this feature now
This PR updates the analyze api to conform with the PRD requirements; additionally it provides more structure to the summary by adding a ModelAnalysisSummary class; Additionally this class includes a
__sub__
function allowing us to do something likesummary_a - summary_b
out of the box, which means all summaries can be compared against each otherTest Command:
sparsezoo.analyze ~/models/resnet50-quac.onnx
Output:
sparsezoo.analyze ~/models/resnet50-quac.onnx INFO:root:Starting Analysis ... INFO:root:Analysis complete, collating results... Params: MODEL SPARSITY QUANTIZED COUNT SIZE /home/rahul/models/resnet50-quac.onnx 94.90 91.97 25530472 253419776 Ops: MODEL SPARSITY QUANTIZED COUNT SIZE /home/rahul/models/resnet50-quac.onnx 94.90 91.97 25530559 253422560 Overall: MODEL SPARSITY QUANTIZED /home/rahul/models/resnet50-quac.onnx 94.90 91.97
by-layers
support to analyze api(s) #301 MergedAfter Merging all PRs in the updated output is as follows: