MCPcopy Create free account
hub / github.com/XiaoMi/mace / scratch_size_of_reshape

Method scratch_size_of_reshape

tools/python/micro/scratch_computer.py:196–202  ·  view source on GitHub ↗
(self, op_def)

Source from the content-addressed store, hash-verified

194 return len(op_def.input) * self.get_data_bytes(mace_pb2.DT_INT32) * 3
195
196 def scratch_size_of_reshape(self, op_def):
197 shape_dims = self.get_op_input_dims(op_def, 1)
198 shape_size = 1
199 for i in range(len(shape_dims)):
200 shape_size *= shape_dims[i]
201
202 return shape_size * self.get_data_bytes(mace_pb2.DT_INT32)

Callers

nothing calls this directly

Calls 2

get_op_input_dimsMethod · 0.95
get_data_bytesMethod · 0.95

Tested by

no test coverage detected