MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / analysis_io

Function analysis_io

python/paddle/pir_utils.py:192–205  ·  view source on GitHub ↗
(program: paddle.pir.Program)

Source from the content-addressed store, hash-verified

190
191
192def analysis_io(program: paddle.pir.Program):
193 # 1. don't support control flow now
194 # 2. each op is consider read all inputs and write all outputs once.
195 # 3. unit is "GByte"
196 total_io = 0.0
197 for op in program.global_block().ops:
198 for operand in op.operands():
199 value = operand.source()
200 total_io += get_memory(value)
201
202 for value in op.results():
203 total_io += get_memory(value)
204
205 return total_io / 1024 / 1024 / 1024
206
207
208def append_activation_in_pir(input, act=None, use_cudnn=None):

Callers

nothing calls this directly

Calls 5

get_memoryFunction · 0.85
global_blockMethod · 0.80
operandsMethod · 0.80
sourceMethod · 0.45
resultsMethod · 0.45

Tested by

no test coverage detected