This repository was archived by the owner on Jun 3, 2025. It is now read-only.
sparsezoo.analyze-common-cli base #279
Merged
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 does three things:
Test:
Working example after merging #280
sparsezoo.analyze ~/models/resnet50-quac.onnx INFO:root:Starting Analysis ... INFO:root:Analysis complete, collating results... MODEL: /home/rahul/models/resnet50-quac.onnx PARAMETERS: Total Percent Total % Sparsity % FP32 Precision % INT8 Precision % Weight 25502912.0 99.89 95.0 8.03 91.97 Bias 27560.0 0.11 0.0 3.63 96.37 Total 25530472.0 100.00 94.9 8.03 91.97 PARAMETERIZED OPS: Total Percent Total % Sparsity % FP32 Precision % INT8 Precision % QLinearConv 23481472.0 91.97 95.55 0.00 100.00 Gemm 2049000.0 8.03 87.42 100.00 0.00 Total 25530472.0 100.00 94.90 8.03 91.97 NON PARAMETERIZED OPS: Total Percent Total % Sparsity % FP32 Precision % INT8 Precision % QuantizeLinear 17.0 19.54 0.0 100.0 0.0 GlobalAveragePool 1.0 1.15 0.0 100.0 0.0 DequantizeLinear 33.0 37.93 0.0 100.0 0.0 Softmax 1.0 1.15 0.0 100.0 0.0 MaxPool 1.0 1.15 0.0 100.0 0.0 Gather 1.0 1.15 0.0 100.0 0.0 Unsqueeze 1.0 1.15 0.0 100.0 0.0 Relu 13.0 14.94 0.0 100.0 0.0 Reshape 1.0 1.15 0.0 100.0 0.0 Add 16.0 18.39 0.0 100.0 0.0 Concat 1.0 1.15 0.0 100.0 0.0 Shape 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 %: 95.0 Quantized Parameterized Ops %: 91.97 Quantized Non-Parameterized Ops %: 0.0