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

#14982: Update threshold logic #15362

Merged
merged 3 commits into from
Nov 24, 2024
Merged

Conversation

VirdhatchaniKN
Copy link
Contributor

@VirdhatchaniKN VirdhatchaniKN commented Nov 22, 2024

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 :
Screenshot 2024-11-22 at 6 09 03 PM
  • pytest tests/ttnn/unit_tests/operations/eltwise/test_activation.py::test_threshold :
Screenshot 2024-11-22 at 6 09 39 PM
  • pytest tests/ttnn/unit_tests/operations/eltwise/test_composite.py::test_unary_composite_threshold_ttnn :
Screenshot 2024-11-22 at 6 10 21 PM
  • 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 :
Screenshot 2024-11-22 at 6 11 40 PM

Checklist

  • Post commit CI passes

Doc screenshot

Screenshot 2024-11-22 at 11 06 48 PM

@VirdhatchaniKN VirdhatchaniKN force-pushed the virdhatchani/unary_example_3 branch 3 times, most recently from d58c433 to b40ffdf Compare November 22, 2024 13:04
@VirdhatchaniKN VirdhatchaniKN marked this pull request as ready for review November 22, 2024 16:35
@VirdhatchaniKN VirdhatchaniKN force-pushed the virdhatchani/unary_example_3 branch from b40ffdf to d50960f Compare November 22, 2024 16:40
Copy link
Contributor

@Aswinmcw Aswinmcw left a 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",
Copy link
Contributor

@KalaivaniMCW KalaivaniMCW Nov 22, 2024

Choose a reason for hiding this comment

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

"value to replace with"

Copy link
Contributor Author

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

@VirdhatchaniKN VirdhatchaniKN force-pushed the virdhatchani/unary_example_3 branch 3 times, most recently from 862cb28 to 15bfa83 Compare November 24, 2024 10:48
@VirdhatchaniKN
Copy link
Contributor Author

@VirdhatchaniKN VirdhatchaniKN force-pushed the virdhatchani/unary_example_3 branch from 15bfa83 to c1c6982 Compare November 24, 2024 13:38
@VirdhatchaniKN VirdhatchaniKN merged commit 388d56e into main Nov 24, 2024
9 checks passed
@VirdhatchaniKN VirdhatchaniKN deleted the virdhatchani/unary_example_3 branch November 24, 2024 13:44
spoojaryTT pushed a commit that referenced this pull request Nov 25, 2024
### 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">
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.

6 participants