-
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
#14982: Update threshold logic #15362
Conversation
d58c433
to
b40ffdf
Compare
b40ffdf
to
d50960f
Compare
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.
LGTM
module, | ||
ttnn::threshold, | ||
"threshold", "Threshold value", | ||
"value", "Value value", | ||
"value", "Replacing value", |
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.
"value to replace with"
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.
That would look same as PyTorch, and hence i thought this would work
862cb28
to
15bfa83
Compare
15bfa83
to
c1c6982
Compare
### Ticket #14982 ### Problem description Provide context for the problem. ### What's changed - Updated threshold logic to handle cases when input_tensor=threshold value - Updated with supported data type and layout Tests : - `pytest tests/ttnn/python_api_testing/non_working_unit_tests/grayskull/test_eltwise_threshold.py` : <img width="1101" alt="Screenshot 2024-11-22 at 6 09 03 PM" src="https://github.com/user-attachments/assets/80b5820f-8e4d-4a8b-9914-d3df21f72f90"> - `pytest tests/ttnn/unit_tests/operations/eltwise/test_activation.py::test_threshold` : <img width="1087" alt="Screenshot 2024-11-22 at 6 09 39 PM" src="https://github.com/user-attachments/assets/61f30c51-5d78-49d2-af08-e7c764a330a0"> - `pytest tests/ttnn/unit_tests/operations/eltwise/test_composite.py::test_unary_composite_threshold_ttnn` : <img width="1088" alt="Screenshot 2024-11-22 at 6 10 21 PM" src="https://github.com/user-attachments/assets/a2ca063e-65fb-4a4e-a9cc-6348eb3c95c0"> - `python tests/ttnn/sweep_tests/run_sweeps.py --include threshold.py` - passed - `pytest tests/ttnn/unit_tests/operations/eltwise/test_composite.py::test_threshold_example` : <img width="1092" alt="Screenshot 2024-11-22 at 6 11 40 PM" src="https://github.com/user-attachments/assets/56eafb45-8011-440c-8958-f212869b0634"> ### Checklist - [ ] Post commit CI passes ### Doc screenshot <img width="963" alt="Screenshot 2024-11-22 at 11 06 48 PM" src="https://github.com/user-attachments/assets/1be96ac7-dc1b-434a-ad1d-ebe95edd7b51">
Ticket
#14982
Problem description
Provide context for the problem.
What's changed
Tests :
pytest tests/ttnn/python_api_testing/non_working_unit_tests/grayskull/test_eltwise_threshold.py
:pytest tests/ttnn/unit_tests/operations/eltwise/test_activation.py::test_threshold
:pytest tests/ttnn/unit_tests/operations/eltwise/test_composite.py::test_unary_composite_threshold_ttnn
:python tests/ttnn/sweep_tests/run_sweeps.py --include threshold.py
- passedpytest tests/ttnn/unit_tests/operations/eltwise/test_composite.py::test_threshold_example
:Checklist
Doc screenshot