Skip to content
Snippets Groups Projects
Commit 9dba93d4 authored by auphelia's avatar auphelia
Browse files

[HLSCustomOp] Added new parameters to functions to allow using the same...

[HLSCustomOp] Added new parameters to functions to allow using the same function during npysim and ipgen
parent 28c215c9
No related branches found
No related tags found
No related merge requests found
......@@ -37,8 +37,10 @@ class HLSCustomOp(CustomOp):
node = self.onnx_node
# generate top cpp file for ip generation
path = self.get_nodeattr("code_gen_dir_ipgen")
self.generate_params(model, path)
self.global_includes()
self.defines()
self.defines("ipgen")
self.blackboxfunction()
self.pragmas()
self.docompute()
......@@ -86,9 +88,10 @@ class HLSCustomOp(CustomOp):
def code_generation_npysim(self, model):
node = self.onnx_node
self.generate_params(model)
path = self.get_nodeattr("code_gen_dir_npysim")
self.generate_params(model, path)
self.global_includes()
self.defines()
self.defines("npysim")
self.read_npy_data()
self.strm_decl()
self.docompute()
......@@ -170,7 +173,7 @@ compilation transformations?
# load output npy file
self.npy_to_dynamic_output(context)
def generate_params(self, model):
def generate_params(self, model, path):
pass
@abstractmethod
......@@ -178,7 +181,7 @@ compilation transformations?
pass
@abstractmethod
def defines(self):
def defines(self, var):
pass
@abstractmethod
......
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