-
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
sparsezoo.analyze
#263
sparsezoo.analyze
#263
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.
Super clean. Excited to have this tool
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 pending coment
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.
@rahul-tuli I've added more details into the PRD to prescribe the UX for presenting the results. The JSON works, but we'd like to format it into a more readable format. Attaching a screenshot from that PRD
4fa1d50
to
f00904d
Compare
@markurtz Updated! |
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! Looks like there's a merge conflict to resolve
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.
@rahul-tuli this is still printing out as a dict rather than the easier to read and more compact table format
c1ef58c
to
f27d29c
Compare
sparsezoo.analyze
Current PR represents the feature branch for
sparsezoo.analyze
utilityThis utility can be used to run
ModelAnalysis
on ONNX models, and printsrelevant summary to screen, if a
--save
option is given then thecomplete analysis is written to the specified file
Usage
Examples:
[UPDATED OUTPUT]
COMMAND:
sparsezoo3.9) 🥃 sparsezoo sparsezoo.analyze "zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned85_quant-none-vnni"
OUTPUT:
INFO:root:Downloading files from SparseZoo: 'zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned85_quant-none-vnni' INFO:root:Starting Analysis ... INFO:root:Analysis complete, collating results... MODEL: zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned85_quant-none-vnni PARAMETERS: Total Percent Total % Sparsity % FP32 Precision % INT8 Precision % Weight 25502912.0 99.89 79.22 8.03 91.97 Bias 27560.0 0.11 0.00 3.63 96.37 Total 25530472.0 100.00 79.13 8.03 91.97 PARAMETERIZED OPS: Total Percent Total % Sparsity % FP32 Precision % INT8 Precision % QLinearConv 23481472.0 91.97 86.04 0.00 100.00 Gemm 2049000.0 8.03 0.00 100.00 0.00 Total 25530472.0 100.00 79.13 8.03 91.97 NON PARAMETERIZED OPS: Total Percent Total % Sparsity % FP32 Precision % INT8 Precision % Add 16.0 18.39 0.0 100.0 0.0 Reshape 1.0 1.15 0.0 100.0 0.0 Unsqueeze 1.0 1.15 0.0 100.0 0.0 QuantizeLinear 17.0 19.54 0.0 100.0 0.0 Concat 1.0 1.15 0.0 100.0 0.0 Relu 13.0 14.94 0.0 100.0 0.0 GlobalAveragePool 1.0 1.15 0.0 100.0 0.0 Shape 1.0 1.15 0.0 100.0 0.0 DequantizeLinear 33.0 37.93 0.0 100.0 0.0 MaxPool 1.0 1.15 0.0 100.0 0.0 Softmax 1.0 1.15 0.0 100.0 0.0 Gather 1.0 1.15 0.0 100.0 0.0 Total 87.0 100.00 0.0 100.0 0.0 SUMMARY: Number of Parameters: 25530472 Number of Operations: 25530559 Weight Sparsity %: 79.22 Quantized Parameterized Ops %: 91.97 Quantized Non-Parameterized Ops %: 0.0
sparsezoo.analyze
#264