Skip to content
Snippets Groups Projects
Commit 05d52334 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[CustomOp] ensure all cycle estimates are int

parent 22564943
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ class FMPadding_Batch(HLSCustomOp):
simd = self.get_nodeattr("SIMD")
batch_size = self.get_nodeattr("numInputVectors")
exp_cycles = (channels / simd) * batch_size * odim * odim
return exp_cycles
return int(exp_cycles)
def get_normal_input_shape(self):
idim = self.get_nodeattr("ImgDim")
......
......@@ -187,7 +187,7 @@ class GlobalAccPool_Batch(HLSCustomOp):
ch = self.get_nodeattr("NumChannels")
pe = self.get_nodeattr("PE")
folds = int(ch / pe)
return np.prod(self.get_folded_input_shape()[:-1]) + folds
return int(np.prod(self.get_folded_input_shape()[:-1]) + folds)
def execute_node(self, context, graph):
mode = self.get_nodeattr("exec_mode")
......
......@@ -99,7 +99,7 @@ class StreamingMaxPool_Batch(HLSCustomOp):
# derived from StreamingMaxPool_Batch loop nest
k = self.get_nodeattr("PoolDim")
ifm_dim = self.get_nodeattr("ImgDim")
return ifm_dim * (ifm_dim + (ifm_dim / k))
return int(ifm_dim * (ifm_dim + (ifm_dim / k)))
def get_instream_width(self):
dt_bits = self.get_input_datatype().bitwidth()
......
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