Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 3c04596

Browse files
author
Sara Adkins
committed
Merge branch 'main' into fix_size_calcuation
2 parents 8f33437 + eff2482 commit 3c04596

File tree

15 files changed

+18
-13
lines changed

15 files changed

+18
-13
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
from pydantic import BaseModel, Field, PositiveFloat, PositiveInt
3131

3232
from sparsezoo import Model
33-
from sparsezoo.analyze.utils.helpers import numpy_array_representer
34-
from sparsezoo.analyze.utils.models import (
33+
from sparsezoo.analyze_v1.utils.helpers import numpy_array_representer
34+
from sparsezoo.analyze_v1.utils.models import (
3535
DenseSparseOps,
3636
Entry,
3737
ModelEntry,
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
plt = None
2626
matplotlib_available = False
2727

28-
from sparsezoo.analyze.analysis import ModelAnalysis, NodeAnalysis
28+
from sparsezoo.analyze_v1.analysis import ModelAnalysis, NodeAnalysis
2929

3030

3131
__all__ = [

src/sparsezoo/analyze_v2/memory_access_analysis.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ def get_memory_access_bits(
165165
node_weight = get_node_weight(model_graph, node)
166166
precision = get_numpy_quantization_level(node_weight)
167167
counts = memory_access_counts["single"]["counts"]
168-
counts_sparse = memory_access_counts["single"]["counts_sparse"]
169-
bits = (counts - counts_sparse) * precision
168+
bits = counts * precision
170169
is_quantized = is_quantized_layer(model_graph, node)
171170

172171
return {

src/sparsezoo/analyze_v2/operation_analysis.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,17 @@ def get_operation_bits(
167167
is_quantized_op = "32" not in str(precision)
168168

169169
single_counts = ops["single"]["counts"]
170+
<<<<<<< HEAD
170171
single_counts_sparse = ops["single"]["counts_sparse"]
171172
single_bits = (single_counts - single_counts_sparse) * precision
172173
block4_counts = ops["block4"]["counts"]
173174
block4_counts_sparse = ops["block4"]["counts_sparse"]
174175
block4_bits = (block4_counts - block4_counts_sparse) * precision
176+
=======
177+
single_bits = single_counts * precision
178+
block4_counts = ops["block4"]["counts"]
179+
block4_bits = block4_counts * precision
180+
>>>>>>> main
175181
return {
176182
"tensor": {
177183
"counts": single_counts,

tests/sparsezoo/analyze/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import pytest
2323

2424
from sparsezoo import Model
25-
from sparsezoo.analyze import ModelAnalysis
25+
from sparsezoo.analyze_v1 import ModelAnalysis
2626
from sparsezoo.utils.graph_editor import ONNXGraph
2727

2828

0 commit comments

Comments
 (0)