-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#13953: Incorrectly handled bfloat16 -0.0 in ttnn.signbit (#28)
### Ticket [Link to Github Issue](tenstorrent/tt-metal#13953) ### Problem description `-0.0` Incorrectly handled as `0.0` in `ttnn.signbit`. bfloat16 data format should preserve `-0.0` values through the unpacker, math, packer pipeline. However, `-0.0` in bfloat16 format gets passed into the kernel as `0.0` and `signbit` reads this as a positive value. The detailed reasoning is as follows. When unpacking to the Dest register, bfloat16 values are first packed into Src registers and then moved to Dest. When moving these values from Src, `-0.0` is interpreted as `0.0` and src zero flags are set. This leads to `-0.0` values not being moved, but instead, zeroes being written into relevant locations in Dest. ### What's changed Disabled src zero flags for eltwise unary/sfpu operations. `-0.0` values are now moved to Dest instead of written with zeroes. ### Checklist - [x] [All post commit](https://github.com/tenstorrent/tt-metal/actions/runs/13592906337) CI passes - [x] [Blackhole Post commit](https://github.com/tenstorrent/tt-metal/actions/runs/13592910095) CI passes (if applicable)
- Loading branch information
1 parent
3717876
commit b82ac6a
Showing
4 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters