blob: 97afde31e19137232a43220d56a3262230033307 [file] [log] [blame]
erik.andersson@arm.comad45f792021-02-03 10:20:16 +01001# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved.
Tim Hall79d07d22020-04-27 18:20:16 +01002#
3# SPDX-License-Identifier: Apache-2.0
4#
5# Licensed under the Apache License, Version 2.0 (the License); you may
6# not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an AS IS BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Tim Hall79d07d22020-04-27 18:20:16 +010016# Description:
17# Neural network graph classes and enums.
18# Pass - A packed pass containing one or more Operations.
19# CascadedPass - A scheduled pass containing one or more Passes, as well as a scheduling strategy and block
20# configurations.
21# Subgraph - Holds a neural network subgraph, pointing at Tensors, Operations, Passes, and CascadedPasses.
22# Graph - A full neural network graph with one or more Subgraphs.
Tim Hall79d07d22020-04-27 18:20:16 +010023import enum
patrik.gustavssoneeb85152020-12-21 17:10:40 +000024from typing import List
Tim Hall79d07d22020-04-27 18:20:16 +010025
Louis Verhaardaee5d752020-09-30 09:01:52 +020026from .operation import Op
patrik.gustavssoneeb85152020-12-21 17:10:40 +000027from .shape4d import Shape4D
Louis Verhaardaee5d752020-09-30 09:01:52 +020028
Tim Hall79d07d22020-04-27 18:20:16 +010029
30class PassPlacement(enum.Enum):
31 Unknown = 0
32 Cpu = 1
33 Npu = 2
34 MemoryOnly = 3
35 StartupInit = 4
36
37
38class TensorAllocator(enum.Enum):
39 LinearAlloc = 1
40 Greedy = 2
Louis Verhaardd7002522021-01-20 17:23:54 +010041 HillClimb = 3
Tim Hall79d07d22020-04-27 18:20:16 +010042
43 def __str__(self):
44 return self.name
45
46
Patrik Gustavsson8f1f9aa2021-06-28 07:41:58 +020047class NetworkType(enum.Enum):
48 TFLite = 1
49 TOSA = 2
50
51
Tim Hall79d07d22020-04-27 18:20:16 +010052class Pass:
53 def __init__(self, name, placement, is_element_wise, npu_block_type):
54 self.inputs = []
55 self.intermediates = []
56 self.outputs = []
57 self.ops = []
58 self.primary_op = None
59 self.ifm_tensor = None
60 self.ifm2_tensor = None
61 self.ofm_tensor = None
62 self.weight_tensor = None
63 self.scale_tensor = None
Fredrik Svedberga0c36242020-06-03 15:43:31 +020064 self.lut_tensor = None
Tim Hall79d07d22020-04-27 18:20:16 +010065 self.name = name
66 self.cascade = None
67 self.placement = placement
patrik.gustavssoneeb85152020-12-21 17:10:40 +000068 self.ifm_shapes: List[Shape4D] = []
69 self.ofm_shapes: List[Shape4D] = []
Tim Hall79d07d22020-04-27 18:20:16 +010070
71 # TODO: rename is_element_wise because it is not the same as an ElementWise operator. It is used by the tensor
72 # allocation and requires that the OFM and IFM has the exact same address. Essentially complete overlap.
73 self.is_element_wise = is_element_wise
74 self.npu_block_type = npu_block_type
75 self.block_config = None # will be filled in by scheduler
76 self.shared_buffer = None # will be filled in by scheduler
Tim Halld8339a72021-05-27 18:49:40 +010077 self.scheduling_info = None # will be filled in by scheduler
Tim Hall79d07d22020-04-27 18:20:16 +010078
79 self.predecessors = []
80 self.successors = []
81
82 def __str__(self):
83 return "<nng.Pass '%s', %s, ops=%s>" % (self.name, self.placement, [op.type for op in self.ops])
84
85 __repr__ = __str__
86
87 def get_primary_op_ifm_weights(self):
88 if not self.primary_op:
89 return None, None
90 return self.primary_op.get_ifm_ifm2_weights_ofm()[::2]
91
92 def get_primary_op_ifm_ifm2_weights_ofm(self):
93 if not self.primary_op:
94 return None, None, None, None
95 return self.primary_op.get_ifm_ifm2_weights_ofm()
96
97 def get_primary_op_ifm_weights_biases_ofm(self):
98 if not self.primary_op:
99 return None, None, None, None
100 return self.primary_op.get_ifm_weights_biases_ofm()
101
Fredrik Svedberga0c36242020-06-03 15:43:31 +0200102 def get_primary_op_lut(self):
103 if not self.primary_op:
104 return None
105 return self.primary_op.activation_lut
106
Tim Hall79d07d22020-04-27 18:20:16 +0100107
108class SchedulingStrategy(enum.Enum):
109 Unknown = -1
110 IfmStream = 0
111 WeightStream = 1
112
113
114class SchedulerRewrite(enum.Enum):
115 Nop = 0
116 ChangeTensorSubPurpose = 1
117
118
119class CascadedPass:
120 def __init__(self, name, strat, inputs, intermediates, outputs, passes, placement, is_element_wise):
121 self.name = name
122 self.strategy = strat
123 self.inputs = inputs
124 self.intermediates = intermediates
125 self.outputs = outputs
126 self.passes = passes
127 self.placement = placement
128 self.is_element_wise = is_element_wise
129
130 self.predecessors = []
131 self.successors = []
Tim Halld8339a72021-05-27 18:49:40 +0100132 self.sram_used = 0
Tim Hall79d07d22020-04-27 18:20:16 +0100133
134 def __str__(self):
135 return "<nng.CascadedPass strategy=%s x %s '%s', passes=%s, block_configs=%s>" % (
136 self.strategy,
137 len(self.passes),
138 self.name,
139 [ps.name for ps in self.passes],
140 [ps.block_config for ps in self.passes],
141 )
142
143 __repr__ = __str__
144
145
146class Subgraph:
147 def __init__(self, name="<unnamed>", placement=PassPlacement.Cpu):
148 self.output_tensors = []
149 self.input_tensors = []
150 self.original_inputs = [] # Preserve the original input order
151 self.passes = []
152 self.cascaded_passes = []
153 self.name = name
154 self.high_level_command_stream = []
155 self.placement = placement
156 self.command_stream_tensor = None
157 self.flash_tensor = None
Louis Verhaard0b9c9a32020-09-15 14:05:38 +0200158 # Scratch information locally used in the scheduler
Tim Halld8339a72021-05-27 18:49:40 +0100159 self.schedule = None
160 self.sched_ops = []
161
erik.andersson@arm.comad45f792021-02-03 10:20:16 +0100162 self.generated_stream_id = None
Tim Hall79d07d22020-04-27 18:20:16 +0100163
164 self.memory_used = {}
Patrik Gustavssoneca2e952020-05-27 09:15:11 +0200165 self.memory_used_per_type = {}
Tim Hall79d07d22020-04-27 18:20:16 +0100166
167 def __str__(self):
168 return "<nng.Subgraph '%s', n_passes=%d, n_cascaded_passes=%d>" % (
169 self.name,
170 len(self.passes),
171 len(self.cascaded_passes),
172 )
173
174 __repr__ = __str__
175
176 def update_consumers(self):
177 visit_op_set = set()
178 visit_tensor_set = set()
179 self.input_tensors = []
180
181 print_visit = False
182
183 def visit_op(op):
184 if op in visit_op_set:
185 return
186
187 visit_op_set.add(op)
188 for inp in op.inputs:
Jacob Bohlin67e0d8f2020-08-20 10:53:02 +0200189 if not inp:
190 continue
Tim Hall79d07d22020-04-27 18:20:16 +0100191 if print_visit:
192 print(inp, "adding consumer", op)
193 visit_tensor(inp)
194 inp.consumer_list.append(op)
195
Michael McGeaghf3e3ad72020-12-02 12:39:03 +0000196 if op.type in (Op.Placeholder, Op.SubgraphInput):
Tim Hall79d07d22020-04-27 18:20:16 +0100197 assert len(op.outputs) == 1
198 self.input_tensors.append(op.outputs[0])
199
200 for out in op.outputs:
201 if out not in visit_tensor_set:
202 out.consumer_list = [] # reset unvisited output, just in case
203
204 def visit_tensor(tens):
205 if tens in visit_tensor_set:
206 return
207 visit_tensor_set.add(tens)
208 tens.consumer_list = []
209 for op in tens.ops:
210 visit_op(op)
211
212 for ps in self.passes:
213 for tens in ps.outputs + ps.inputs:
Jacob Bohlin67e0d8f2020-08-20 10:53:02 +0200214 if not tens:
215 continue
Tim Hall79d07d22020-04-27 18:20:16 +0100216 tens.consumer_list = [] # reset unvisited tensors to start with
217
218 for tens in self.output_tensors:
219 visit_tensor(tens)
220 tens.consumer_list.append(None) # special op to indicate that the graph consumes the result
221
222 print_visit = True
223 for ps in self.passes:
224 for op in ps.ops:
225 visit_op(op)
226 for tens in ps.inputs:
227 visit_tensor(tens)
228
229 def build_pass_links(self):
230 for idx, ps in enumerate(self.passes):
231 ps.time = 2 * idx
232 ps.predecessors = []
233 ps.successors = []
234
235 for ps in self.passes:
236 for tens in ps.inputs:
237 for op in tens.ops:
238 pred_pass = op.scheduled_pass
239 assert pred_pass.time < ps.time
240 if ps not in pred_pass.successors:
241 pred_pass.successors.append(ps)
242
243 if pred_pass not in ps.predecessors:
244 ps.predecessors.append(pred_pass)
245
246 assert tens in pred_pass.outputs
247
248 def build_pass_dag_predecessors(self):
249 for ps in self.passes:
250 ps.dag_predecessors = []
251
252 class State(enum.Enum):
253 NotVisited = 0
254 BeingVisited = 1
255 Visited = 2
256
257 pass_visit_dict = {}
258
259 def visit_pass(ps):
260 state = pass_visit_dict.get(ps, State.NotVisited)
261 if state == State.Visited:
262 return True
263 elif state == State.BeingVisited:
264 return False # this is a loop, need to remove this link
265 elif state == State.NotVisited:
266 pass_visit_dict[ps] = State.BeingVisited
267
268 ps.dag_predecessors = []
269 for pred in ps.predecessors:
270 if visit_pass(pred):
271 ps.dag_predecessors.append(pred)
272
273 pass_visit_dict[ps] = State.Visited
274 return True
275
276 for ps in self.passes:
277 if not ps.successors:
278 visit_pass(ps)
279
280 def build_cascaded_pass_links(self):
281 for cps in self.cascaded_passes:
282 cps.predecessors = []
283 cps.successors = []
284
285 for cps in self.cascaded_passes:
286 for tens in cps.inputs:
287 for op in tens.ops:
288 pred_cpass = op.scheduled_pass.cascade
289 if cps not in pred_cpass.successors:
290 pred_cpass.successors.append(cps)
291
292 if pred_cpass not in cps.predecessors:
293 cps.predecessors.append(pred_cpass)
294
295 assert tens in pred_cpass.outputs
296
297 def refresh_after_modification(self):
298 self.update_consumers()
299
300 def prune_startup_init_pass(self):
301 assert len(self.passes) >= 1
302 ps = self.passes[0]
303 assert ps.placement == PassPlacement.StartupInit
304
305 ps.outputs = [out_tens for out_tens in ps.outputs if len(out_tens.consumers()) > 0]
306 ps.ops = [op for op in ps.ops if op.outputs[0] in ps.outputs]
307
308 def get_all_ops(self):
309 all_ops = []
310 visit_op_set = set()
311 visit_tensor_set = set()
312
313 def visit_op(op):
314 if op in visit_op_set:
315 return
316 visit_op_set.add(op)
317 for inp in op.inputs:
318 visit_tensor(inp)
319
320 all_ops.append(op)
321
322 def visit_tensor(tens):
Andreas Nevalainene1cc3de2020-09-08 15:31:02 +0200323 if tens is None or tens in visit_tensor_set:
Tim Hall79d07d22020-04-27 18:20:16 +0100324 return
325 visit_tensor_set.add(tens)
326 for op in tens.ops:
327 visit_op(op)
328
329 for tens in self.output_tensors:
330 visit_tensor(tens)
331
332 return all_ops
333
334 def print_operators(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100335 print("print_operators()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100336 all_ops = self.get_all_ops()
337 unique_ops = []
Tim Hall79d07d22020-04-27 18:20:16 +0100338 for op in all_ops:
Michael McGeaghf3e3ad72020-12-02 12:39:03 +0000339 if op.type in (Op.Const, Op.Identity, Op.Placeholder):
Tim Hall79d07d22020-04-27 18:20:16 +0100340 continue
341
Louis Verhaardaee5d752020-09-30 09:01:52 +0200342 attrs = op.attrs.copy()
343 if op.type in (Op.Conv2D, Op.Conv2DBias, Op.DepthwiseConv2DBias):
Tim Hall79d07d22020-04-27 18:20:16 +0100344 kshape = op.inputs[1].shape
345 attrs["kshape"] = [kshape[0], kshape[1]]
Louis Verhaardaee5d752020-09-30 09:01:52 +0200346 attrs["type"] = op.type.name
Tim Hall79d07d22020-04-27 18:20:16 +0100347 attrs.pop("use_cudnn_on_gpu", None)
Fredrik Svedberg16343052021-04-16 14:36:22 +0200348 custom_options = attrs.pop("custom_options", None)
Tim Hall79d07d22020-04-27 18:20:16 +0100349 if attrs not in unique_ops:
350 unique_ops.append(attrs)
351 # print attributes in human readable format
352 a = attrs.copy()
Fredrik Svedberg16343052021-04-16 14:36:22 +0200353 if custom_options is not None:
354 a["custom_options"] = custom_options
Tim Hall79d07d22020-04-27 18:20:16 +0100355 s = a.pop("type")
356 data_format = a.pop("data_format", None)
357 if data_format and data_format != b"NHWC":
358 s += " " + str(data_format)
359 t = a.pop("T", None)
360 if t:
361 s += " " + str(t)[9:-2]
362 srct = a.pop("SrcT", None)
363 if srct:
364 s += " " + str(srct)[9:-2]
365 dstt = a.pop("DstT", None)
366 if dstt:
367 s += "->" + str(dstt)[9:-2]
368 print(s + " " + str(a))
369
Fredrik Svedbergc875aa62021-05-06 09:53:31 +0200370 def print_graph(self, label=None):
371 if label:
372 print(f"\n[ {label} ]")
Michael McGeagh775e3962020-07-28 11:44:22 +0100373 print("print_graph()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100374 all_ops = self.get_all_ops()
375 for idx, op in enumerate(all_ops):
376 print(idx, op.type, op.name)
377
378 def print_graph_with_tensors(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100379 print("print_graph_with_tensors()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100380 all_ops = self.get_all_ops()
381 for idx, op in enumerate(all_ops):
382 print(idx, op.type, op.name)
383 for idx, tens in enumerate(op.inputs):
Patrik Gustavssoneca2e952020-05-27 09:15:11 +0200384 print(
385 " Input %02d %20s %20s %20s %s"
386 % (idx, tens.purpose.name, tens.mem_area.name, tens.mem_type.name, tens)
387 )
Tim Hall79d07d22020-04-27 18:20:16 +0100388 for idx, tens in enumerate(op.outputs):
Patrik Gustavssoneca2e952020-05-27 09:15:11 +0200389 print(
390 " Output %02d %20s %20s %20s %s"
391 % (idx, tens.purpose.name, tens.mem_area.name, tens.mem_type.name, tens)
392 )
Tim Hall79d07d22020-04-27 18:20:16 +0100393 print()
394
395 def print_graph_with_tensor_quantization(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100396 print("print_graph_with_tensor_quantization()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100397 all_ops = self.get_all_ops()
398 for idx, op in enumerate(all_ops):
399 print(idx, op.type, op.name)
400 for idx, tens in enumerate(op.inputs):
401 q = tens.quantization
402 if q is None:
403 print(" Input %02d %10s NO QUANTIZATION INFO %s" % (idx, tens.dtype, tens.name))
404 else:
405 print(
406 " Input %02d %10s min=%s max=%s scale=%s zero_point=%s %s"
407 % (idx, tens.dtype, q.min, q.max, q.scale_f32, q.zero_point, tens.name)
408 )
409 for idx, tens in enumerate(op.outputs):
410 q = tens.quantization
411 if q is None:
412 print(" Output %02d %10s NO QUANTIZATION INFO %s" % (idx, tens.dtype, tens.name))
413 else:
414 print(
415 " Output %02d %10s min=%s max=%s scale=%s zero_point=%s %s"
416 % (idx, tens.dtype, q.min, q.max, q.scale_f32, q.zero_point, tens.name)
417 )
418 print()
419
420 def print_passes(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100421 print("print_passes()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100422 for idx, ps in enumerate(self.passes):
423 print("%03d %s" % (idx * 2, ps))
424
425 def print_passes_with_tensors(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100426 print("print_passes_with_tensors()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100427 for idx, ps in enumerate(self.passes):
428 print("%3d %s" % (idx * 2, ps))
429 for idx, tens in enumerate(ps.inputs):
430 print(
431 " Input %2d %-15s %-15s %-15s %s"
432 % (idx, tens.purpose.name, tens.mem_area.name, tens.format.name, tens.name)
433 )
434 for idx, tens in enumerate(ps.intermediates):
435 print(
436 " Intermediate %2d %-15s %-15s %-15s %s"
437 % (idx, tens.purpose.name, tens.mem_area.name, tens.format.name, tens.name)
438 )
439 for idx, tens in enumerate(ps.outputs):
440 print(
441 " Output %2d %-15s %-15s %-15s %s"
442 % (idx, tens.purpose.name, tens.mem_area.name, tens.format.name, tens.name)
443 )
444 print()
445
446 def print_cascaded_passes(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100447 print("print_cascaded_passes()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100448 for idx, ps in enumerate(self.cascaded_passes):
449 print("%3d %s SRAM used %.1f KB" % (idx * 2, ps, ps.sram_used / 1024))
450
451 def print_cascaded_passes_with_tensors(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100452 print("print_cascaded_passes_with_tensors()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100453 for idx, ps in enumerate(self.cascaded_passes):
454 print("%3d %s SRAM used %.1f KB" % (idx * 2, ps, ps.sram_used / 1024))
455 for idx, tens in enumerate(ps.inputs):
456 print(
457 " Input %2d %-15s %-15s %-15s %s"
458 % (idx, tens.purpose.name, tens.mem_area.name, tens.format.name, tens.name)
459 )
460 for idx, tens in enumerate(ps.intermediates):
461 print(
462 " Intermediate %2d %-15s %-15s %-15s %s"
463 % (idx, tens.purpose.name, tens.mem_area.name, tens.format.name, tens.name)
464 )
465 for idx, tens in enumerate(ps.outputs):
466 print(
467 " Output %2d %-15s %-15s %-15s %s"
468 % (idx, tens.purpose.name, tens.mem_area.name, tens.format.name, tens.name)
469 )
470 print()
471
472 def print_cascaded_passes_with_tensor_sizes(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100473 print("print_cascaded_passes_with_tensor_sizes()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100474 for idx, ps in enumerate(self.cascaded_passes):
475 print("%3d %s SRAM used %.1f KB" % (idx * 2, ps, ps.sram_used / 1024))
476 for idx, tens in enumerate(ps.inputs):
477 print(
478 " Input %2d %7.1f KB %-24s %-15s %-15s %-20s %s"
479 % (
480 idx,
481 tens.storage_size() / 1024,
482 tens.storage_shape,
483 tens.mem_area.name,
484 tens.purpose.name,
485 tens.format.name,
486 tens.name,
487 )
488 )
489 for idx, tens in enumerate(ps.intermediates):
490 print(
491 " Intermediate %2d %7.1f KB %-24s %-15s %-15s %-20s %s"
492 % (
493 idx,
494 tens.storage_size() / 1024,
495 tens.storage_shape,
496 tens.mem_area.name,
497 tens.purpose.name,
498 tens.format.name,
499 tens.name,
500 )
501 )
502 for idx, tens in enumerate(ps.outputs):
503 print(
504 " Output %2d %7.1f KB %-24s %-15s %-15s %-20s %s"
505 % (
506 idx,
507 tens.storage_size() / 1024,
508 tens.storage_shape,
509 tens.mem_area.name,
510 tens.purpose.name,
511 tens.format.name,
512 tens.name,
513 )
514 )
515 print()
516
517 def print_high_level_command_stream(self):
Michael McGeagh775e3962020-07-28 11:44:22 +0100518 print("print_high_level_command_stream()", self.name)
Tim Hall79d07d22020-04-27 18:20:16 +0100519 for idx, cmd in enumerate(self.high_level_command_stream):
520 print("%3d %s" % (idx, cmd))
521
522
523class Graph:
524 def __init__(self, name="<unnamed>", batch_size=1):
525 self.name = name
526 self.batch_size = batch_size
527 self.subgraphs = []
Michael McGeagh22f74e12020-08-07 16:21:03 +0100528 self.metadata = []
Tim Hall79d07d22020-04-27 18:20:16 +0100529 self.memory_used = {}
Diqing Zhongdb5124c2021-01-11 12:52:48 +0100530 self.total_original_weights = 0
Fredrik Svedbergf5c07c42021-04-23 14:36:42 +0200531 self.total_npu_weights = 0
532 self.total_npu_encoded_weights = 0
Louis Verhaard3c07c972020-05-07 08:12:58 +0200533 self.weight_cache = None # See CompressedWeightCache
Tim Hall79d07d22020-04-27 18:20:16 +0100534
535 def get_root_subgraph(self):
536 return self.subgraphs[0]
537
538 def prune_startup_init_pass(self):
539 for sg in self.subgraphs:
540 sg.prune_startup_init_pass()
541
542 def update_consumers(self):
543 for sg in self.subgraphs:
544 sg.update_consumers()
545
546 def refresh_after_modification(self):
547 for sg in self.subgraphs:
548 sg.refresh_after_modification()
549
550 def print_operators(self):
551 for sg in self.subgraphs:
552 sg.print_operators()
553
Fredrik Svedbergc875aa62021-05-06 09:53:31 +0200554 def print_graph(self, label=None):
Tim Hall79d07d22020-04-27 18:20:16 +0100555 for sg in self.subgraphs:
Fredrik Svedbergc875aa62021-05-06 09:53:31 +0200556 sg.print_graph(label)
Tim Hall79d07d22020-04-27 18:20:16 +0100557
558 def print_graph_with_tensors(self):
559 for sg in self.subgraphs:
560 sg.print_graph_with_tensors()
561
562 def print_graph_with_tensor_quantization(self):
563 for sg in self.subgraphs:
564 sg.print_graph_with_tensor_quantization()
565
566 def print_passes(self):
567 for sg in self.subgraphs:
568 sg.print_passes()
569
570 def print_passes_with_tensors(self):
571 for sg in self.subgraphs:
572 sg.print_passes_with_tensors()
573
574 def print_cascaded_passes(self):
575 for sg in self.subgraphs:
576 sg.print_cascaded_passes()
577
578 def print_cascaded_passes_with_tensors(self):
579 for sg in self.subgraphs:
580 sg.print_cascaded_passes_with_tensors()
581
582 def print_cascaded_passes_with_tensor_sizes(self):
583 for sg in self.subgraphs:
584 sg.print_cascaded_passes_with_tensor_sizes()
585
586 def print_high_level_command_stream(self):
587 for sg in self.subgraphs:
588 sg.print_high_level_command_stream()