Skip to content

C++ mangled name support in Kernel#2480

Draft
ypapadop-amd wants to merge 13 commits intomainfrom
ypapadop-amd/mangled-name-support
Draft

C++ mangled name support in Kernel#2480
ypapadop-amd wants to merge 13 commits intomainfrom
ypapadop-amd/mangled-name-support

Conversation

@ypapadop-amd
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread python/iron/kernel.py Outdated
"""
self._name = name

symbol_name = find_mangled_symbol(f"build/{bin_name}", name)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to figure out how to get the actual .o path here, it's just the name and then it happens to work during linking.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a general implicit assumption that the programming_examples/basic/vector_reduce_min/vector_reduce_min.py file is called within the build dir.

Copy link
Copy Markdown
Collaborator Author

@ypapadop-amd ypapadop-amd Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. aiecc.py is called in the build directory which does the linking, but the MLIR generation happens earlier. I currently need the object file earlier, unless I defer mangling until linking (which it would be the preferred approach).

Generating MLIR while in the build directory allows it to work correctly.

@ypapadop-amd ypapadop-amd force-pushed the ypapadop-amd/mangled-name-support branch 2 times, most recently from 39e2847 to eefb7c3 Compare August 7, 2025 00:41
@ypapadop-amd
Copy link
Copy Markdown
Collaborator Author

Maybe this would be better as an MLIR pass?

@hunhoffe hunhoffe mentioned this pull request Jan 23, 2026
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