Closed hecmay closed 4 years ago
The SODA backend is not aware of the Stencil
IR node. I'll work on it.
Question about the semantics: the above example contains two separate Stencil
IR nodes. What should I return from hcl.build
? HLS code concatenated?
I think so. It is supposed to return the concatenated HLSC kernel code, or use the similar semantics for Stencil Nodes in VHLS CodeGen (e.g. return the function calls only and save the definition inside a separate file)? @seanlatias What do you think?
And also a follow-up to the issue. The program above cannot run through the Vivado HLS CodeGen (i.e. hcl.build(s, target="vhls")
). The error message is as followed:
[21:16:58] src/codegen/build_soda.cc:90: Traceback (most recent call last):
File "/work/shared/users/phd/sx233/heterocl/soda/src/sodac", line 139, in <module>
main()
File "/work/shared/users/phd/sx233/heterocl/soda/src/sodac", line 127, in main
xocl.print_code(stencil, args)
File "/work/shared/users/phd/sx233/heterocl/soda/src/soda/codegen/xilinx/opencl.py", line 36, in print_code
kernel.print_code(stencil, tmp)
File "/work/shared/users/phd/sx233/heterocl/soda/src/soda/codegen/xilinx/hls_kernel.py", line 173, in print_code
burst_width=stencil.burst_width)
File "/work/shared/users/phd/sx233/heterocl/soda/src/soda/codegen/xilinx/hls_kernel.py", line 282, in _print_module_definition
raise util.InternalError('cannot process such a burst yet')
haoda.util.InternalError: cannot process such a burst yet
Another question about how we can connect those stencil kernels with FIFOs: each stencil node is mapped to a sub-kernel function with m_axi interfaces, and there are corresponding BurstRead
and BurstWrite
functions inside to stream the data into/from the streaming channels. Can SODAC generate HLSC code fr Stencil node without the AXIS master interfaces, and replace it with the streaming channels?
The error is supposed to go away with the Stencil
IR node being used.
Regarding integration, replacing m_axi
with a streaming interface is certainly doable.
axis
interface instead of m_axi
.axis
interface will not support TLAST
to remove some resource overhead. This requires that whoever reading from the interface must know when to stop by itself (which is likely the case because it knows the loop trip count).I probably won't have bandwidth to actually implement those until the ICCAD deadline. I'll keep you posted.
Thanks! It's totally fine. No rush.
I will also update the IR integration part to support importing RTL modules. We can discuss later after the deadline.
Minimal test case to reproduce error:
The generated IR is correct, but SODAC failed to generate XHLS code from the IR
@Blaok