Skip to content

Commit

Permalink
Using used-symbols in Xilinx code generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnick83 committed Oct 4, 2023
1 parent 8ba05f1 commit 17fa4c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dace/codegen/targets/xilinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,10 @@ def generate_flatten_loop_post(kernel_stream, sdfg, state_id, node):
def generate_nsdfg_header(self, sdfg, state, state_id, node, memlet_references, sdfg_label):
# TODO: Use a single method for GPU kernels, FPGA modules, and NSDFGs
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)
return f'void {sdfg_label}({arguments}) {{\n#pragma HLS INLINE'
Expand Down

0 comments on commit 17fa4c1

Please sign in to comment.