-
Notifications
You must be signed in to change notification settings - Fork 96
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
TTNN throws an exception if second operand of binary Ops require broadcast #13566
Comments
Please attach a pytest to reproduce this exact case. Also, note that the workaround we currently have for broadcasting is to use the ttnn.bcast. For example https://github.com/tenstorrent/tt-metal/blob/main/models/demos/t3000/falcon40b/tt/model_utils.py#L504 |
@uazizTT Kindly provide the examples to debug further on this issue |
@umadevimcw Just trying to understand what kind of example you need, if I send you a test case from tt-mlir compiler that asserts at this bug, does that work for you? |
@KalaivaniMCW @uazizTT Is this still an open issue ? If not, can you please close this ticket ? Thanks. |
I think we still need this issue to track support of broadcast across all binary ops. If someone has a list of ops that support broadcasting for both operands of a binary op then please update it here. |
@uazizTT The broadcast support for binary operations has been added under binary_ng, the ops available as ttnn.experimental.add etc. In case of existing binary op apis, list of ops that support broadcasting for both operands are - ttnn.add/sub/mul |
@KalaivaniMCW Thank you for updating about the progress, is there any other change in the function signatures besides adding For the shapes, you can try any number of arbitrary shapes. If you think those are working now, the next steps would be run tests from tt-mlir and tt-torch repositories. We need to update the documentation about the function signatures, but you can try to following the build steps to see if those tests are passing with these new operations. |
@uazizTT yes.. there maybe some features that are still in progress, like sharding and then output_dtype typecasting. That is why these new ops are under ttnn.experimental - once they have all the eltwise features they will be integrated into the existing binary op APIs. |
TTNN throws the following exception when trying to broadcast second operand of a binary op:
RuntimeError: TT_THROW @ tt-metal/src/tt-metal/ttnn/cpp/ttnn/operations/eltwise/binary/device/binary_device_operation.cpp:46: tt::exception
TT_THROW("ttnn::operations::binary::BinaryDeviceOperation: unsupported broadcast");
Apply canonicalization on the operands or allow broadcasting for all operands.
The text was updated successfully, but these errors were encountered: