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

[StreamingFC] generate PassThroughActivation when no thresholds

parent c3c51a25
No related branches found
No related tags found
No related merge requests found
......@@ -243,13 +243,19 @@ class StreamingFCLayer_Batch(HLSCustomOp):
def docompute(self):
node = self.onnx_node
tmpl_args = self.get_template_param_values()
if self.get_nodeattr("TMEM") == 0:
odtype_hls_str = self.get_output_datatype().get_hls_datatype_str()
threshs = "PassThroughActivation<%s>()" % odtype_hls_str
else:
threshs = "threshs"
self.code_gen_dict["$DOCOMPUTE$"] = [
"""{}<MW1, MH1, SIMD1, PE1, {}, {}, {}>
(in0, out, weights, threshs, numReps, {});""".format(
(in0, out, weights, {}, numReps, {});""".format(
node.op_type,
tmpl_args["TSrcI"],
tmpl_args["TDstI"],
tmpl_args["TWeightI"],
threshs,
self.get_nodeattr("resType"),
)
]
......
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