Skip to content
Snippets Groups Projects
Commit 5f22c7ea authored by auphelia's avatar auphelia
Browse files

[Structure] Added new folder for hls custom nodes and updated related files

parent 7def72fb
No related branches found
No related tags found
No related merge requests found
from abc import abstractmethod
from finn.custom_op import CustomOp
class HLSCustomOp(CustomOp):
def __init__(self):
super().__init__()
@abstractmethod
def code_generation(self, node):
pass
import numpy as np
import onnx.helper as helper
import sys
import os
from finn.core.datatype import DataType
from finn.core.utils import get_by_name
from finn.custom_op import CustomOp
from finn.custom_op.fpgadataflow import HLSCustomOp
import finn.backend.fpgadataflow.code_gen_for_single_node_execution as code_gen
class StreamingMaxPool(CustomOp):
class StreamingMaxPool(HLSCustomOp):
def make_shape_compatible_op(self, node):
pass
......@@ -28,4 +30,7 @@ class StreamingMaxPool(CustomOp):
## deleting temporary files
#for temp_file in temp_files:
# os.remove(temp_file)
sys.exit(1)
sys.exit(0)
def code_generation(self, node):
pass
......@@ -2,7 +2,7 @@
# registered and plug in correctly into the infrastructure
from finn.custom_op.multithreshold import MultiThreshold
from finn.custom_op.xnorpopcount import XnorPopcountMatMul
from finn.custom_op.streamingmaxpool import StreamingMaxPool
from finn.custom_op.fpgadataflow.streamingmaxpool import StreamingMaxPool
# create a mapping of all known CustomOp names and classes
custom_op = {}
......
......@@ -17,7 +17,7 @@ int main(){
hls::stream<ap_uint<2>> in ("in");
hls::stream<ap_uint<2>> out ("out");
ap_uint<2> dat;x
ap_uint<2> dat;
for(int i=0;i < num_values/2; i++){
dat.range(0,0) = loaded_data[i];
......
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