-
Notifications
You must be signed in to change notification settings - Fork 75
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
[New Op] Added dropout unary op #12474
Conversation
@@ -278,6 +290,39 @@ Tensor Softplus::invoke( | |||
optional_output_tensor); | |||
} | |||
|
|||
Tensor Dropout::invoke( |
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.
Wdyt about extracting this to its own .hpp/cpp?
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.
Don't want to do it right now. It is implemented the same way as any other op and uses its infra.
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.
Overall LGTM, but format change makes it hard to distinguish actual change from everything else. I think it is best to revert style changes.
ttnn/cpp/ttnn/operations/eltwise/unary/common/unary_op_utils.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/eltwise/unary/common/unary_op_utils.cpp
Outdated
Show resolved
Hide resolved
return detail::unary_impl( | ||
DefaultQueueId, | ||
input, | ||
{UnaryWithParam{UnaryOpType::DROPOUT, {static_cast<float>(seed), probability, scale}}}, |
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.
why seed needs to be float?
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.
cc @ayerofieiev-tt ahahah :-D
Ticket
None
Problem description
I've found that we have lkk kernel but no unary dropout.
What's changed
Added unary op: dropout.
Added usage example.
Unfortunately reproducibility is low. I was able to get same results twice only if I reset device between calls.
I implemented using_dropout.py example but didn't add tests because I cannot get the same result twice.
Feedback to the kernel team was provided.
Also std is pretty high but I can use it.
Comparison vs pytorch:
https://github.com/tenstorrent/tt-metal/actions/runs/10874629279
Checklist