-
Notifications
You must be signed in to change notification settings - Fork 97
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
[Bug Report] We should never import torch outside of using golden functions #17059
Labels
Comments
How are the top-level statements like this supposed to reference torch then? ttnn.attach_golden_function(
ttnn.sub_bw,
golden_function=lambda grad, a, b, *args, **kwargs: _golden_function_backward(
torch.sub, grad, a, b, *args, **kwargs
),
) |
https://github.com/tenstorrent/tt-metal/blob/main/ttnn/ttnn/operations/binary_backward.py#L23
|
Okay, so don't use lambdas then. Gotcha. |
1 task
mouliraj-mcw
added a commit
that referenced
this issue
Jan 31, 2025
### Ticket Link to Github Issue #17059 ### Problem description We should never import torch outside of golden functions. ### What's changed Updated the golden functions ### Checklist - [x] [All Post commit CI ](https://github.com/tenstorrent/tt-metal/actions/runs/12986959759)
yieldthought
pushed a commit
that referenced
this issue
Jan 31, 2025
### Ticket Link to Github Issue #17059 ### Problem description We should never import torch outside of golden functions. ### What's changed Updated the golden functions ### Checklist - [x] [All Post commit CI ](https://github.com/tenstorrent/tt-metal/actions/runs/12986959759)
nikileshx
pushed a commit
to nikileshx/tt-metal
that referenced
this issue
Feb 3, 2025
### Ticket Link to Github Issue tenstorrent#17059 ### Problem description We should never import torch outside of golden functions. ### What's changed Updated the golden functions ### Checklist - [x] [All Post commit CI ](https://github.com/tenstorrent/tt-metal/actions/runs/12986959759)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
We should never import torch outside of golden functions.
https://github.com/tenstorrent/tt-metal/blob/main/ttnn/ttnn/operations/binary_backward.py#L15
To Reproduce
Steps to reproduce the behavior:
Just import ttnn without torch and you will see this.
The text was updated successfully, but these errors were encountered: