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

Fixed TTNN Enums conflicting with TT #1194

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Conversation

vprajapati-tt
Copy link
Contributor

Copy link
Contributor

@nsmithtt nsmithtt left a comment

Choose a reason for hiding this comment

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

Can you paste what the failure signature is? It seems a bit odd that this is happening.

@vprajapati-tt
Copy link
Contributor Author

Hey @nsmithtt, the error occurs when importing both the tt and ttnn modules in Python. You end up getting the following error:

RuntimeError: Attribute builder for 'TT_Arch' is already registered with func: <function _tt_arch at 0x7f430c0f45e0>

Seemingly the issue is some weird quirk of mlir-tblgen that doubly generates the TT Enums and when both dialects are imported they're doubly registered (causing this error). This behaviour was also replicated when I automatically generated ttkernel Enums. The current solution is a bit of a workaround, but I wanted to unblock ttnn dialect related development for now.

@vprajapati-tt
Copy link
Contributor Author

Update: figured out the issue. Silly spelling mistake, PR updated.

@vprajapati-tt vprajapati-tt merged commit 7122775 into main Nov 7, 2024
18 checks passed
@vprajapati-tt vprajapati-tt deleted the vprajapati/ttnn-enum-fix branch November 7, 2024 18:30
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.

Generated TTNN Enums include conflicting TT Enums
3 participants