Skip to content

Commit

Permalink
Adapt FPGA code generator to address used symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
tbennun committed Oct 3, 2023
1 parent 49fdb3c commit 8ba05f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dace/codegen/targets/intel_fpga.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,10 @@ def generate_module(self, sdfg, state, kernel_name, module_name, subgraph, param
def generate_nsdfg_header(self, sdfg, state, state_id, node, memlet_references, sdfg_label):
# Intel FPGA needs to deal with streams
arguments = [f'{atype} {aname}' for atype, aname, _ in memlet_references]
fsyms = node.sdfg.used_symbols(all_symbols=False, keep_defined_in_mapping=True)
arguments += [
f'{node.sdfg.symbols[aname].as_arg(aname)}' for aname in sorted(node.symbol_mapping.keys())
if aname not in sdfg.constants
if aname in fsyms and aname not in sdfg.constants
]
arguments = ', '.join(arguments)
function_header = f'void {sdfg_label}({arguments}) {{'
Expand Down

0 comments on commit 8ba05f1

Please sign in to comment.