03-31-2021 07:36 AM
We had some mysterious errors during the Vitis kernel compilation stage, where the kernel name in kernel.xml would not match the --kernel passed to v++:
ERROR: [v++ 17-70] Application Exception: Failed to add kernel 'my_kernel__name' to XO container because the kernel name 'my_kernel_name' defined in kernel.xml does not match.
It turned out that the culprit was Vitis HLS:
WARNING: [SYN 201-103] Legalizing function name 'my_kernel__name' to 'my_kernel_name'.
It seems double underscores are not allowed in function names.
While this is all good and well, the problem is that this renaming is not done consistently, and thus leads to an error further along the compilation process, which is difficult to debug because it does not point to the actual root cause.
I would think that 1) compilation should just fail if the kernel contains double underscores to avoid cryptic errors, or 2) that the renaming should be done consistently so Vitis HLS doesn't break the build by v++.
04-07-2021 03:04 AM
Thank you for reporting this behavior.
Please let me know the version you are using.