-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added temporary fix for breaking / new attributes in parser #1780
base: main
Are you sure you want to change the base?
Conversation
vprajapati-tt
commented
Jan 14, 2025
- This should help fix the issues seen in Enable viewing of llama prefill in tt-explorer #1769
- Simple fix to deal with new attributes that might break the system.
btw, I can confirm, with the fix proposed, I don't get the same error anymore. I can view parts of the model in explorer now. |
@@ -324,6 +324,9 @@ def parse_force(attr): | |||
@AttrHandler.register_handler("dtype") | |||
def parse_dtype(attr): | |||
dtype = tt.ir.DataTypeAttr.maybe_downcast(attr) | |||
if dtype is None: | |||
# Potential for dtype to be StringAttr instead of tt.DataTypeAttr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we explicitly try to cast to StringAttr instead of checking for None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking for None
is done to see if the above downcast failed, I changed it to explicitly cast to string.