Skip to content
Snippets Groups Projects
Commit 515feec3 authored by auphelia's avatar auphelia
Browse files

[CustomOp] Add get_exp_cycles for streamingmaxpool and thresholding_batch

parent 4f92b8c5
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,10 @@ class StreamingMaxPool_Batch(HLSCustomOp):
folded_oshape = self.get_folded_output_shape()
return np.prod(folded_oshape[:-1])
def get_exp_cycles(self):
# Channels * batch size * odim * odim
return np.prod(self.get_folded_output_shape()[:-1])
def get_instream_width(self):
dt_bits = self.get_input_datatype().bitwidth()
ifm_ch = self.get_nodeattr("NumChannels")
......
......@@ -215,6 +215,10 @@ class Thresholding_Batch(HLSCustomOp):
nf = np.prod(self.get_folded_output_shape()[:-1])
return nf
def get_exp_cycles(self):
# Channels/PE * batch size * fmdim * fmdim
return np.prod(self.get_folded_output_shape()[:-1])
def get_template_param_values(self):
"""Returns the template parameter values according to input, output and weight
data types."""
......
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