Skip to content
Snippets Groups Projects
Commit 0b322384 authored by auphelia's avatar auphelia
Browse files

[CheckSum] Renamed customop

parent 14cb14a3
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
from finn.custom_op.fpgadataflow.addstreams_batch import AddStreams_Batch from finn.custom_op.fpgadataflow.addstreams_batch import AddStreams_Batch
from finn.custom_op.fpgadataflow.channelwise_op_batch import ChannelwiseOp_Batch from finn.custom_op.fpgadataflow.channelwise_op_batch import ChannelwiseOp_Batch
from finn.custom_op.fpgadataflow.checksum import checksum from finn.custom_op.fpgadataflow.checksum import CheckSum
from finn.custom_op.fpgadataflow.concat import StreamingConcat from finn.custom_op.fpgadataflow.concat import StreamingConcat
from finn.custom_op.fpgadataflow.convolutioninputgenerator import ( from finn.custom_op.fpgadataflow.convolutioninputgenerator import (
ConvolutionInputGenerator, ConvolutionInputGenerator,
...@@ -84,4 +84,4 @@ custom_op["StreamingDataflowPartition"] = StreamingDataflowPartition ...@@ -84,4 +84,4 @@ custom_op["StreamingDataflowPartition"] = StreamingDataflowPartition
custom_op["UpsampleNearestNeighbour_Batch"] = UpsampleNearestNeighbour_Batch custom_op["UpsampleNearestNeighbour_Batch"] = UpsampleNearestNeighbour_Batch
custom_op["Lookup"] = Lookup custom_op["Lookup"] = Lookup
custom_op["StreamingConcat"] = StreamingConcat custom_op["StreamingConcat"] = StreamingConcat
custom_op["checksum"] = checksum custom_op["CheckSum"] = CheckSum
...@@ -35,7 +35,7 @@ from finn.custom_op.fpgadataflow.hlscustomop import HLSCustomOp ...@@ -35,7 +35,7 @@ from finn.custom_op.fpgadataflow.hlscustomop import HLSCustomOp
from finn.util.data_packing import npy_to_rtlsim_input, rtlsim_output_to_npy from finn.util.data_packing import npy_to_rtlsim_input, rtlsim_output_to_npy
class checksum(HLSCustomOp): class CheckSum(HLSCustomOp):
"""Class that corresponds to custom_hls checksum function.""" """Class that corresponds to custom_hls checksum function."""
def __init__(self, onnx_node): def __init__(self, onnx_node):
......
...@@ -37,7 +37,7 @@ from finn.util.fpgadataflow import is_fpgadataflow_node ...@@ -37,7 +37,7 @@ from finn.util.fpgadataflow import is_fpgadataflow_node
def _is_hook_node(node): def _is_hook_node(node):
if node.op_type in ["checksum"]: if node.op_type in ["CheckSum"]:
return True return True
else: else:
return False return False
...@@ -82,7 +82,7 @@ class InsertHook(Transformation): ...@@ -82,7 +82,7 @@ class InsertHook(Transformation):
if n0_hook in list_supported_hooks: if n0_hook in list_supported_hooks:
if n0_hook == "checksum": if n0_hook == "checksum":
if len(consumers) == 1: if len(consumers) == 1:
if consumers[0].op_type == "checksum": if consumers[0].op_type == "CheckSum":
continue continue
n0_normal_oshape = n0.get_normal_output_shape() n0_normal_oshape = n0.get_normal_output_shape()
n0_folded_oshape = n0.get_folded_output_shape() n0_folded_oshape = n0.get_folded_output_shape()
...@@ -100,7 +100,7 @@ class InsertHook(Transformation): ...@@ -100,7 +100,7 @@ class InsertHook(Transformation):
[1], [1],
) )
chk_node = oh.make_node( chk_node = oh.make_node(
"checksum", "CheckSum",
[output_name], [output_name],
outputs=[chk_otensor.name, chk_result.name], outputs=[chk_otensor.name, chk_result.name],
domain="finn.custom_op.fpgadataflow", domain="finn.custom_op.fpgadataflow",
......
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