mct-nightly 2.3.0.20250426.524__py3-none-any.whl → 2.3.0.20250428.605__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/METADATA +1 -1
- {mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/RECORD +9 -9
- {mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/WHEEL +1 -1
- model_compression_toolkit/__init__.py +1 -1
- model_compression_toolkit/core/common/graph/memory_graph/memory_graph.py +0 -3
- model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_manager.py +8 -3
- model_compression_toolkit/core/common/mixed_precision/resource_utilization_tools/resource_utilization_calculator.py +13 -3
- {mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/licenses/LICENSE.md +0 -0
- {mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/top_level.txt +0 -0
{mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mct-nightly
|
3
|
-
Version: 2.3.0.
|
3
|
+
Version: 2.3.0.20250428.605
|
4
4
|
Summary: A Model Compression Toolkit for neural networks
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
6
6
|
Classifier: License :: OSI Approved :: Apache Software License
|
{mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/RECORD
RENAMED
@@ -1,5 +1,5 @@
|
|
1
|
-
mct_nightly-2.3.0.
|
2
|
-
model_compression_toolkit/__init__.py,sha256=
|
1
|
+
mct_nightly-2.3.0.20250428.605.dist-info/licenses/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
|
2
|
+
model_compression_toolkit/__init__.py,sha256=KTddrZxT3r5G_WJ3NWOixbYFMVcLk032Ii0ssUccyic,1557
|
3
3
|
model_compression_toolkit/constants.py,sha256=iJ6vfTjC2oFIZWt8wvHoxEw5YJi3yl0Hd4q30_8q0Zc,3958
|
4
4
|
model_compression_toolkit/defaultdict.py,sha256=LSc-sbZYXENMCw3U9F4GiXuv67IKpdn0Qm7Fr11jy-4,2277
|
5
5
|
model_compression_toolkit/logger.py,sha256=L3q7tn3Uht0i_7phnlOWMR2Te2zvzrt2HOz9vYEInts,4529
|
@@ -47,7 +47,7 @@ model_compression_toolkit/core/common/graph/memory_graph/compute_graph_max_cut.p
|
|
47
47
|
model_compression_toolkit/core/common/graph/memory_graph/cut.py,sha256=ZUGgn-vDA7unzc9UWhK2v_2i5nfdkSG1xOpgpDmziEo,2870
|
48
48
|
model_compression_toolkit/core/common/graph/memory_graph/max_cut_astar.py,sha256=1TWLVAOlT8g8q_YyOdjm5cQfiSDZ5EHGQcb509Gnzjg,17895
|
49
49
|
model_compression_toolkit/core/common/graph/memory_graph/memory_element.py,sha256=ISD2BvJWj5mB91jrFjG8VQb0oOoLBoita_thCZWzCPI,4238
|
50
|
-
model_compression_toolkit/core/common/graph/memory_graph/memory_graph.py,sha256=
|
50
|
+
model_compression_toolkit/core/common/graph/memory_graph/memory_graph.py,sha256=dME1M0hOjBdW5SqUbl1BPxvFRs-ZtDiF1dDGJuWJbl8,7711
|
51
51
|
model_compression_toolkit/core/common/hessian/__init__.py,sha256=E7LK3K_1AwMCQokanNc1JODMwUKNOKmwXQiGQ7GO10I,1033
|
52
52
|
model_compression_toolkit/core/common/hessian/hessian_info_service.py,sha256=8NDC_WLe3ZnY_v3e_Vz_lseF22lrbvhFmArihpeWfuI,14291
|
53
53
|
model_compression_toolkit/core/common/hessian/hessian_info_utils.py,sha256=1axmN0tjJSo_7hUr2d2KMv4y1pBi19cqWSQpi4BbdsA,1458
|
@@ -69,13 +69,13 @@ model_compression_toolkit/core/common/mixed_precision/mixed_precision_candidates
|
|
69
69
|
model_compression_toolkit/core/common/mixed_precision/mixed_precision_quantization_config.py,sha256=r1t025_QHshyoop-PZvL7x6UuXaeplCCU3h4VNBhJHo,4309
|
70
70
|
model_compression_toolkit/core/common/mixed_precision/mixed_precision_ru_helper.py,sha256=-hOMBucYn12ePyLd0b1KxniPOIRu4b53SwEzv0bWToI,4943
|
71
71
|
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_facade.py,sha256=d5-3j2e_rdcQOT7c4s0p7640i3nSetjJ6MgMhhMM7dc,6152
|
72
|
-
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_manager.py,sha256=
|
72
|
+
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_manager.py,sha256=658DBP0sY6DRqEbFcK1gX4EGQMeaBSFE5-7_Py6sioE,37718
|
73
73
|
model_compression_toolkit/core/common/mixed_precision/sensitivity_evaluation.py,sha256=4bkM8pYKvk18cxHbx973Dz6qWrNT0MRm44cuk__qVaI,27297
|
74
74
|
model_compression_toolkit/core/common/mixed_precision/set_layer_to_bitwidth.py,sha256=P8QtKgFXtt5b2RoubzI5OGlCfbEfZsAirjyrkFzK26A,2846
|
75
75
|
model_compression_toolkit/core/common/mixed_precision/solution_refinement_procedure.py,sha256=S1ChgxtUjzXJufNWyRbKoNdyNC6fGUjPeComDMx8ZCo,9479
|
76
76
|
model_compression_toolkit/core/common/mixed_precision/resource_utilization_tools/__init__.py,sha256=Rf1RcYmelmdZmBV5qOKvKWF575ofc06JFQSq83Jz99A,696
|
77
77
|
model_compression_toolkit/core/common/mixed_precision/resource_utilization_tools/resource_utilization.py,sha256=PKkhc5q8pEPnNLXwo3U56EOCfYnPXIvPs0LlCGZOoKU,4426
|
78
|
-
model_compression_toolkit/core/common/mixed_precision/resource_utilization_tools/resource_utilization_calculator.py,sha256=
|
78
|
+
model_compression_toolkit/core/common/mixed_precision/resource_utilization_tools/resource_utilization_calculator.py,sha256=PXBuUUuYDmukjhgyrwEe71egpT_iu-LQt5SqddgkRHo,40793
|
79
79
|
model_compression_toolkit/core/common/mixed_precision/resource_utilization_tools/resource_utilization_data.py,sha256=QQwtl08DiDxUOQGpYPnek_RlZjWm1Ky7tL2ESHXMK78,4050
|
80
80
|
model_compression_toolkit/core/common/mixed_precision/search_methods/__init__.py,sha256=sw7LOPN1bM82o3SkMaklyH0jw-TLGK0-fl2Wq73rffI,697
|
81
81
|
model_compression_toolkit/core/common/mixed_precision/search_methods/linear_programming.py,sha256=6Z6nQL9UH7B8dbcUR0cuCTEYFOKZAlvOb-SCk_cAZFA,6670
|
@@ -528,7 +528,7 @@ model_compression_toolkit/xquant/pytorch/model_analyzer.py,sha256=b93o800yVB3Z-i
|
|
528
528
|
model_compression_toolkit/xquant/pytorch/pytorch_report_utils.py,sha256=UVN_S9ULHBEldBpShCOt8-soT8YTQ5oE362y96qF_FA,3950
|
529
529
|
model_compression_toolkit/xquant/pytorch/similarity_functions.py,sha256=CERxq5K8rqaiE-DlwhZBTUd9x69dtYJlkHOPLB54vm8,2354
|
530
530
|
model_compression_toolkit/xquant/pytorch/tensorboard_utils.py,sha256=mkoEktLFFHtEKzzFRn_jCnxjhJolK12TZ5AQeDHzUO8,9767
|
531
|
-
mct_nightly-2.3.0.
|
532
|
-
mct_nightly-2.3.0.
|
533
|
-
mct_nightly-2.3.0.
|
534
|
-
mct_nightly-2.3.0.
|
531
|
+
mct_nightly-2.3.0.20250428.605.dist-info/METADATA,sha256=qHKhtkD9E5Npa0vcNQc376dwsvBE6iUM0aiTV1S76qg,25560
|
532
|
+
mct_nightly-2.3.0.20250428.605.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
533
|
+
mct_nightly-2.3.0.20250428.605.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
|
534
|
+
mct_nightly-2.3.0.20250428.605.dist-info/RECORD,,
|
@@ -27,4 +27,4 @@ from model_compression_toolkit import data_generation
|
|
27
27
|
from model_compression_toolkit import pruning
|
28
28
|
from model_compression_toolkit.trainable_infrastructure.keras.load_model import keras_load_quantized_model
|
29
29
|
|
30
|
-
__version__ = "2.3.0.
|
30
|
+
__version__ = "2.3.0.20250428.000605"
|
@@ -78,14 +78,18 @@ class MixedPrecisionSearchManager:
|
|
78
78
|
self.mp_topo_configurable_nodes = self.mp_graph.get_configurable_sorted_nodes(fw_info)
|
79
79
|
|
80
80
|
self.ru_targets = target_resource_utilization.get_restricted_targets()
|
81
|
-
self.ru_helper = MixedPrecisionRUHelper(self.
|
81
|
+
self.ru_helper = MixedPrecisionRUHelper(self.original_graph, fw_info, fw_impl)
|
82
82
|
|
83
83
|
self.min_ru_config: Dict[BaseNode, int] = self.mp_graph.get_min_candidates_config(fw_info)
|
84
84
|
self.max_ru_config: Dict[BaseNode, int] = self.mp_graph.get_max_candidates_config(fw_info)
|
85
|
-
self.min_ru = self.ru_helper.compute_utilization(self.ru_targets, self.min_ru_config)
|
86
85
|
|
87
86
|
self.config_reconstruction_helper = ConfigReconstructionHelper(virtual_graph=self.mp_graph,
|
88
87
|
original_graph=self.original_graph)
|
88
|
+
if self.using_virtual_graph:
|
89
|
+
real_min_ru_config: Dict[BaseNode, int] = self.config_reconstruction_helper.reconstruct_config_from_virtual_graph(self.min_ru_config)
|
90
|
+
self.min_ru = self.ru_helper.compute_utilization(self.ru_targets, real_min_ru_config)
|
91
|
+
else:
|
92
|
+
self.min_ru = self.ru_helper.compute_utilization(self.ru_targets, self.min_ru_config)
|
89
93
|
|
90
94
|
def search(self) -> Dict[BaseNode, int]:
|
91
95
|
"""
|
@@ -251,7 +255,8 @@ class MixedPrecisionSearchManager:
|
|
251
255
|
else:
|
252
256
|
cfg = self.min_ru_config.copy()
|
253
257
|
cfg[node] = candidate_idx
|
254
|
-
|
258
|
+
real_cfg = self.config_reconstruction_helper.reconstruct_config_from_virtual_graph(cfg)
|
259
|
+
candidate_rus = self.ru_helper.compute_utilization(self.ru_targets, real_cfg)
|
255
260
|
|
256
261
|
for target, ru in candidate_rus.items():
|
257
262
|
rus_per_candidate[target].append(ru)
|
@@ -18,6 +18,8 @@ from copy import deepcopy
|
|
18
18
|
from enum import Enum, auto
|
19
19
|
from typing import Dict, NamedTuple, Optional, Tuple, List, Iterable, Union, Literal, Sequence
|
20
20
|
|
21
|
+
from model_compression_toolkit.core.common.fusion.graph_fuser import GraphFuser
|
22
|
+
|
21
23
|
from model_compression_toolkit.constants import FLOAT_BITWIDTH
|
22
24
|
from model_compression_toolkit.core import FrameworkInfo
|
23
25
|
from model_compression_toolkit.core.common import Graph, BaseNode
|
@@ -145,8 +147,14 @@ class ResourceUtilizationCalculator:
|
|
145
147
|
raise RuntimeError("Failed to calculate activation memory cuts for graph.")
|
146
148
|
cuts = [cut for cut in cuts if cut.mem_elements.elements]
|
147
149
|
# cache cuts nodes for future use, so do not filter by target
|
148
|
-
self._cuts = {
|
149
|
-
|
150
|
+
self._cuts = {
|
151
|
+
cut: [
|
152
|
+
node
|
153
|
+
for m in cut.mem_elements.elements
|
154
|
+
for node in (self.graph.fusing_info.get_fused_nodes(m.node_name) or (self.graph.find_node_by_name(m.node_name)[0],))
|
155
|
+
]
|
156
|
+
for cut in cuts
|
157
|
+
}
|
150
158
|
return self._cuts
|
151
159
|
|
152
160
|
def compute_resource_utilization(self,
|
@@ -580,7 +588,9 @@ class ResourceUtilizationCalculator:
|
|
580
588
|
|
581
589
|
def _compute_cuts(self):
|
582
590
|
""" Compute activation cuts of the graph. """
|
583
|
-
|
591
|
+
# Compute memory graph on fused graph with fused nodes
|
592
|
+
graph = GraphFuser().apply_node_fusion(self.graph)
|
593
|
+
memory_graph = MemoryGraph(deepcopy(graph))
|
584
594
|
_, _, cuts = compute_graph_max_cut(memory_graph)
|
585
595
|
return cuts
|
586
596
|
|
File without changes
|
{mct_nightly-2.3.0.20250426.524.dist-info → mct_nightly-2.3.0.20250428.605.dist-info}/top_level.txt
RENAMED
File without changes
|