Recommended procedure to debug code generation for FPGAs from its python interface #1054
-
For someone with C++ experience, but who is completely unfamiliar with Dace, what is the recommended route towards debugging dace compiler code generation issues for FPGAs? We are using Dace from its python interface, and would like to contribute to upstream through fixes for issues like #1036 with the dace developers and the community's support. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @krishnakumarg1984, thank you for helping contribute to DaCe! The code generator can be debugged in different ways. If the code generation process itself is failing, the Python debugger would be enough to try and understand what is going on. For compiler errors, like the one in #1036, there are multiple ways of approaching this. First, the code generation process is relatively straightforward and is visualized in the following gif: So if there is a particular hint in the error (array name, kernel) that can pinpoint which node / memlet might be problematic, it would be advisable to place a conditional breakpoint on the function that generates that kind of node, conditioned on the specific label you are looking for. For example, if a map named "kernel_113" in the Xilinx codegen is suspected as the source of the issue, I would place a breakpoint in the If it is hard to understand from which line in the code generator the issue has emerged, we created a configuration entry (disabled by default) that adds, to each line in the generated code, the code generator file/line that generated it. It is Good luck! Please feel free to ask any question. |
Beta Was this translation helpful? Give feedback.
Hi @krishnakumarg1984, thank you for helping contribute to DaCe!
The code generator can be debugged in different ways. If the code generation process itself is failing, the Python debugger would be enough to try and understand what is going on. For compiler errors, like the one in #1036, there are multiple ways of approaching this.
First, the code generation process is relatively straightforward and is visualized in the following gif:
So if there is a particular hint in the error (array name, kernel) that can pinpoint which node / memlet might be problematic, it would be advisable to place a conditional breakpoint on the function that generates that kind of node, conditioned on the speci…