Skip to content
Snippets Groups Projects
Commit 1c799129 authored by auphelia's avatar auphelia
Browse files

[CustomOp] Add get_exp_cycles for duplicatestreams and globalaccpool

parent 169dc12f
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,10 @@ class DuplicateStreams_Batch(HLSCustomOp):
def get_number_output_values(self):
return 2 * np.prod(self.get_folded_output_shape()[1:-1])
def get_exp_cycles(self):
# Channels/PE * batch size * fmdim * fmdim
return np.prod(self.get_folded_output_shape()[:-1])
def execute_node(self, context, graph):
mode = self.get_nodeattr("exec_mode")
node = self.onnx_node
......
......@@ -182,6 +182,10 @@ class GlobalAccPool_Batch(HLSCustomOp):
def get_number_output_values(self):
return np.prod(self.get_folded_output_shape()[1:-1])
def get_exp_cycles(self):
# Channels/PE * batch size (ofmdim = 1)
return np.prod(self.get_folded_output_shape()[:-1])
def execute_node(self, context, graph):
mode = self.get_nodeattr("exec_mode")
node = self.onnx_node
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment