Add changes to support scratchpad buffer patching for new ELFs#9741
Add changes to support scratchpad buffer patching for new ELFs#9741stsoe merged 3 commits intoXilinx:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds runtime/ELF support for patching a dedicated scratchpad memory buffer (via a new scratch-pad-mem symbol) into AIE4 “new ELF” control/instruction buffers instead of relying on .pad.
Changes:
- Introduces
scratch_pad_mem_sizeinmodule_config_aie_gen2_plusand populates it for AIE4-family platforms. - Creates a scratchpad BO (via
hw_context_int::get_scratchpad_mem_buf) and patches its address into ctrlpkt BOs and the instruction BO when the symbol is present. - Adds an
_mbuser-defined literal to express scratchpad sizing.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/runtime_src/core/common/api/xrt_module.cpp |
Creates scratchpad BO and patches scratch-pad-mem into ctrlpkt/instruction buffers during instruction buffer filling. |
src/runtime_src/core/common/api/xrt_elf.cpp |
Sets scratch_pad_mem_size for AIE4 variants and adds _mb literal for sizing. |
src/runtime_src/core/common/api/elf_int.h |
Extends module_config_aie_gen2_plus with scratch_pad_mem_size. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
clang-tidy review says "All clean, LGTM! 👍" |
870257f to
24dfd39
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Rahul Bramandlapalli <rbramand@amd.com> Signed-off-by: rahul <rbramand@amd.com>
Signed-off-by: Rahul Bramandlapalli <rbramand@amd.com>
24dfd39 to
1f127c9
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: rahul <rbramand@amd.com>
1f127c9 to
5dd0cdb
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
Problem solved by the commit
Added changes to create separate buffer for scratchpad and patch it accordingly in instruction buffer and ctrlpkt
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
This is Enhancement feature where aie4 ELFs will now have new scratchpad symbols for patching instead of having them in .pad section.
How problem was solved, alternative solutions (if any) and why they were rejected
scratchpad buffer is needed per hw context and size is platform dependent. We are getting platform info (OS_ABI) from ELF and then creating scratch pad buffer lazily.
Risks (if any) associated the changes in the commit
Low
What has been tested and how, request additional testing if necessary
Tested using existing preemption test case on AIE4 windows and the test passes
Also tested all hw tests from telluride repo on ve2 and all tests passed
Documentation impact (if any)
NA