|
11 | 11 | from Deeploy.CommonExtensions.NetworkDeployers.NetworkDeployerWrapper import NetworkDeployerWrapper |
12 | 12 | from Deeploy.CommonExtensions.NetworkDeployers.SignPropDeployer import SignPropDeployer |
13 | 13 | from Deeploy.DeeployTypes import CodeGenVerbosity, ConstantBuffer, DeploymentEngine, DeploymentPlatform, \ |
14 | | - NetworkContext, NetworkDeployer, NetworkOptimizationPass, NetworkOptimizer, ONNXLayer, Schedule, StructBuffer, \ |
| 14 | + NetworkContext, NetworkDeployer, NetworkOptimizationPass, NetworkOptimizer, Schedule, StructBuffer, \ |
15 | 15 | TopologyOptimizer, TransientBuffer, VariableBuffer, _NoVerbosity |
16 | 16 | from Deeploy.Logging import DEFAULT_LOGGER as log |
17 | 17 | from Deeploy.MemoryLevelExtension.MemoryLevels import MemoryHierarchy, MemoryLevel |
@@ -128,18 +128,6 @@ def getTargetMemoryLevelMapping(self) -> TargetMemoryLevelMapping: |
128 | 128 | f"Platform should be a MemoryPlatform or MemoryPlatformWrapper! Got {type(self.Platform).__name__}" |
129 | 129 | return TargetMemoryLevelMapping(self.graph, self.Platform, self.ctxt) |
130 | 130 |
|
131 | | - def _parseNode(self, node: ONNXLayer, ctxt: NetworkContext, |
132 | | - default_channels_first: bool) -> Tuple[NetworkContext, bool]: |
133 | | - |
134 | | - newCtxt, parsePass = super()._parseNode(node, ctxt, default_channels_first) |
135 | | - |
136 | | - if not parsePass: |
137 | | - return ctxt, False |
138 | | - |
139 | | - newCtxt, self.graph = self.memoryLevelAnnotationOptimizer.optimize(newCtxt, self.graph) |
140 | | - |
141 | | - return newCtxt, parsePass |
142 | | - |
143 | 131 | def bind(self): |
144 | 132 |
|
145 | 133 | ret = super().bind() |
@@ -181,22 +169,6 @@ def getTargetMemoryLevelMapping(self) -> TargetMemoryLevelMapping: |
181 | 169 | f"Platform should be a MemoryPlatform or MemoryPlatformWrapper! Got {type(self.Platform).__name__}" |
182 | 170 | return TargetMemoryLevelMapping(self.graph, self.Platform, self.ctxt) |
183 | 171 |
|
184 | | - def _parseNode(self, node: ONNXLayer, ctxt: NetworkContext, |
185 | | - default_channels_first: bool) -> Tuple[NetworkContext, bool]: |
186 | | - |
187 | | - newCtxt, parsePass = node.parse(ctxt.copy(), default_channels_first) |
188 | | - |
189 | | - if not parsePass: |
190 | | - return ctxt, False |
191 | | - |
192 | | - newCtxt, self.graph = self.memoryLevelAnnotationOptimizer.optimize(newCtxt, self.graph) |
193 | | - newCtxt, LayerBindSuccess = node.typeCheck(newCtxt) |
194 | | - |
195 | | - if not LayerBindSuccess: |
196 | | - return ctxt, False |
197 | | - |
198 | | - return newCtxt, True |
199 | | - |
200 | 172 | def bind(self): |
201 | 173 |
|
202 | 174 | ret = super().bind() |
@@ -229,22 +201,6 @@ def getTargetMemoryLevelMapping(self) -> TargetMemoryLevelMapping: |
229 | 201 | f"Platform should be a MemoryPlatform or MemoryPlatformWrapper! Got {type(self.Platform).__name__}" |
230 | 202 | return TargetMemoryLevelMapping(self.graph, self.Platform, self.ctxt) |
231 | 203 |
|
232 | | - def _parseNode(self, node: ONNXLayer, ctxt: NetworkContext, |
233 | | - default_channels_first: bool) -> Tuple[NetworkContext, bool]: |
234 | | - |
235 | | - newCtxt, parsePass = node.parse(ctxt.copy(), default_channels_first) |
236 | | - |
237 | | - if not parsePass: |
238 | | - return ctxt, False |
239 | | - |
240 | | - newCtxt, self.graph = self.memoryLevelAnnotationOptimizer.optimize(newCtxt, self.graph) |
241 | | - newCtxt, LayerBindSuccess = node.typeCheck(newCtxt) |
242 | | - |
243 | | - if not LayerBindSuccess: |
244 | | - return ctxt, False |
245 | | - |
246 | | - return newCtxt, True |
247 | | - |
248 | 204 | def bind(self): |
249 | 205 |
|
250 | 206 | ret = super().bind() |
|
0 commit comments