-
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
Add forward support for PReLU #14940
Conversation
dc0e900
to
5ba2908
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.
Can you write a sweep tests as well?
For PReLU with scalar weights, sweep tests are already in place(Tensor- scalar version). The sweep tests will be updated to cover the tensor API once PReLU is implemented with support for 1D and 0D tensors. |
c755f5e
to
fbcac9c
Compare
fbcac9c
to
5a3afc2
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
ttnn/cpp/ttnn/operations/eltwise/binary/device/binary_composite_op.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/eltwise/binary/device/binary_composite_op.cpp
Outdated
Show resolved
Hide resolved
4dd3df2
to
8d1bc93
Compare
tt_metal/hw/ckernels/wormhole_b0/metal/llk_api/llk_sfpu/ckernel_sfpu_prelu.h
Outdated
Show resolved
Hide resolved
Can you add this for Blackhole as well? |
8d1bc93
to
34c469d
Compare
tt_metal/hw/ckernels/blackhole/metal/llk_api/llk_sfpu/ckernel_sfpu_prelu.h
Outdated
Show resolved
Hide resolved
tt_metal/hw/ckernels/blackhole/metal/llk_api/llk_sfpu/ckernel_sfpu_prelu.h
Show resolved
Hide resolved
34c469d
to
905d2ee
Compare
tests/ttnn/unit_tests/operations/eltwise/test_binary_composite.py
Outdated
Show resolved
Hide resolved
905d2ee
to
442bed9
Compare
442bed9
to
54c522d
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.
Approving to not block, relying on Eyon approve as owner.
0435daa
to
752eba8
Compare
752eba8
to
5103293
Compare
Ticket
Link to Github Issue #8544
Problem description
Currently PReLU is aliased to LeakyRelu which is not correct. It needs to be properly implemented in the eltwise operation.
What's changed
Additional Information
In Torch PReLU, the second input tensor can only have two valid shapes: either a tensor with a single value (1) or a tensor with a size equal to the number of input channels (default is 1). Currently, This implementation only supports cases where it matches the number of channels. Support for a single-value tensor requires additional handling at the low-level kernel.
Checklist