-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UKernel] Add ukernel to be compiled through peano #1097
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice @jtuyls ! A few comments to address.
compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/XCLBinGen.cpp
Outdated
Show resolved
Hide resolved
compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/XCLBinGen.cpp
Outdated
Show resolved
Hide resolved
compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/aie_elf_files_gen_test.cpp
Show resolved
Hide resolved
Co-authored-by: Abhishek Varma <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
args.emplace_back("-o"); | ||
args.emplace_back(outputFile); | ||
if (verbose) args.emplace_back("-v"); | ||
if (failed(runTool((peanoDir / "bin" / "clang").string(), args, verbose))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, you can do this with peano? I must play around with this, see what the .ll generated looks like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this is seems quite useful for experimentation and speed of dev. However, I have run into a couple of issues already that I think you have seen as well with vectorization:
- O0 results in compilation errors
- Sometimes the stack size usage blows up and this results in incorrect results if it's larger than 1024 and I needed to manually increase it:
DefaultValuedAttr<I32Attr, "0x400">:$stack_size,
Also, it should work with the high level AIE_API as well, but then you need to include those header files and I think they are only available inside Vitis. But with Vitis installed on our CI machines, that should work as well in theory, although I haven't tried it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stack overflow, I suspect that's what is causing the current numerical issues I'm observing Xilinx/llvm-aie#342 -- thanks for this pointer, very well timed!
Adds a path to compile ukernels through peano. The compilation time is a lot faster this way, potentially at a decrease in performance, but potentially ukernels could be written in a way that enables good performance via peano as well.