-
Notifications
You must be signed in to change notification settings - Fork 376
nvfp4 tensor: switch to TorchAOBaseTensor #2788
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -810,6 +810,8 @@ def __tensor_flatten__(self): | |
| if maybe_tensor is not None: | ||
| tensor_data_names.append(tensor_data_name) | ||
|
|
||
| # TODO(future PR): also return names of tensor attributes for easier | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if we could change it, that's what we've been using in the past
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's worth changing, right now it's a list of attribute values without the names, which is way harder to debug than a key:value dictionary. |
||
| # debugging | ||
| return tensor_data_names, [ | ||
| getattr(self, attr) for attr in self.tensor_attribute_names | ||
| ] | ||
|
|
||
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.
nit: remove underscores?
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.
not related to current PR, we can do this in a future PR
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.
from a typehint / ide experience this kinda sucks
is it not possible to have the actual attributes typehinted on the class w/ AOBaseTensor?
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.
we can try to do that as an improvement for future maybe, not sure how to do that yet, maybe we can do some inspection