Skip to content
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

Add handling of namespaces to library generator #2391

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

ramiro050
Copy link
Collaborator

When using custom ops, sometimes PyTorch will insert namespaces to the abstract interpretation function name in the format: __torch__.{namespace_1}.{namespace_2}...{op_name}. The extra namespaces are not part of the abstract interpretation function name, so it needs to be removed before generating the library of MLIR snippets of abstract interpretation functions. This commit adds support for removing the namespace information.

@ramiro050
Copy link
Collaborator Author

@nithinsubbiah, this should fix your issue.

When using custom ops, sometimes PyTorch will insert namespaces to the
abstract interpretation function name in the format:
`__torch__.{namespace_1}.{namespace_2}...{op_name}`.  The extra
namespaces are not part of the abstract interpretation function name,
so it needs to be removed before generating the library of MLIR
snippets of abstract interpretation functions. This commit adds
support for removing the namespace information.
@ramiro050 ramiro050 merged commit ff76210 into llvm:main Aug 11, 2023
@ramiro050 ramiro050 deleted the fix-regex-rebase branch August 11, 2023 16:56
mgehre-amd pushed a commit to Xilinx/torch-mlir that referenced this pull request Sep 18, 2023
When using custom ops, sometimes PyTorch will insert namespaces to the
abstract interpretation function name in the format:
`__torch__.{namespace_1}.{namespace_2}...{op_name}`.  The extra
namespaces are not part of the abstract interpretation function name,
so it needs to be removed before generating the library of MLIR
snippets of abstract interpretation functions. This commit adds
support for removing the namespace information.
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