Skip to content

Fix for AIESW-45264 - #59

Merged
hackwa merged 1 commit into
Xilinx:mainfrom
snigdha-gupta:match-kernel-template-pcs
Oct 7, 2026
Merged

hackwa merged 1 commit into
Xilinx:mainfrom
snigdha-gupta:match-kernel-template-pcs

Conversation

@snigdha-gupta

Copy link
Copy Markdown
Contributor
  • funcs_by_elf used to map a stripped kernel name to a single AIEFunction. When one ELF contained two kernels with the same base name, the last write won, so later stamps looking up that name got the wrong start PC and armed the breakpoint at the wrong address.
  • We now map the stripped kernel name to a list of AIEFunctions.
  • If there is more than one candidate, _pick_instantiation runs both stamp.name (mladf) and func.name (ELF) through _template_key, which reduces each name so the two sources spell identically. It looks the layer's reduced name up in that dict and returns the matching AIEFunction.
  • We then copy that candidate's start/end PCs onto the stamp.
  • The full demangled string cannot be the dict key: mladf and objdump -C spell the same instantiation differently ('\x01' vs 1; defaulted type args omitted vs filled in).
  • A miss still skips that stamp only, same as before.

Stripped kernel names can cover several ELF functions, so keep every instantiation and pick the one whose template arguments match the layer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hackwa
hackwa merged commit 42b43da into Xilinx:main Oct 7, 2026
1 check passed
@snigdha-gupta
snigdha-gupta deleted the match-kernel-template-pcs branch October 7, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants