tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
Apache License 2.0
447 stars 64 forks source link

[Bug Report] IEEE-754 NaN is not handled properly in the unpacker #13525

Open jeongu-moreh opened 2 weeks ago

jeongu-moreh commented 2 weeks ago

Describe the bug Nan is replaced to Inf after unpack.

To Reproduce At commit dee1670985,

Test 1:

  1. Unpack a tile filled with NaN from the source CB to the DEST register.
  2. Pack it to the target CB.
  3. The tile in the target CB is filled with Inf.

Test 2:

  1. Unpack a tile filled with NaN from the source CB to the DEST register.
  2. Get the exponent and mantissa of values in the DEST register with SFPU.
  3. The exponent bits are 1111111 and mantissa bits are all zeros, which is Inf.

Expected behavior NaN must be unpacked as is.

amahmudTT commented 2 weeks ago

@jeongu-moreh Which architecture are you facing the issue in ? and do you have a reproducer by any chance ?

jeongu-moreh commented 2 weeks ago

It's wormhole_b0.