Skip to content
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.logaddexp and logaddexp2 fail with BFLOAT8_B operands [Bug Report][GS][WH] #6392

Closed
Tracked by #6445
npetrovic-tenstorrent opened this issue Mar 14, 2024 · 2 comments
Assignees
Labels

Comments

@npetrovic-tenstorrent
Copy link
Contributor

npetrovic-tenstorrent commented Mar 14, 2024

Logaddexp operations ttnn.logaddexp, ttnn.logadexp2 fail in case of BFLOAT8_B operands (at least one of the operands)

To Reproduce
Steps to reproduce the behavior:
Checkout main branch (soon to be merged into main) and run unit test test_eltwise_logaddexp.py , test_eltwise_logaddexp2.py using this command pattern:

pytest tests/ttnn/python_api_testing/non_working_unit_tests/graykull/test_eltwise_logaddexp.py

Expected behavior
There are few test cases presented in the unit test tests/tt_eager/python_api_testing/non_working_unit_tests/grayskull/test_eltwise_logaddexp.py and they are expected to fail with low PCC error (PCC not so low, but still not passing):

PCC: 0.9580266292610379

The same is expected for test_eltwise_logaddexp2.py as well.

Getting Additional info for the operation under test and its behavior
To get additional information and results for different combinations of input shapes, types, layouts and memory configs for which this operation was tested you can also run locally sweep test:

tests/ttnn/python_api_testing/sweep_tests/test_configs/ci_sweep_tests_broken/grayskull/ttnn_eltwise_exp2_test.yaml

To do this you should:

  1. Follow the Getting Started page to setup the repo, environment variables and python-env
  2. Activate source build/python_env/bin/activate
  3. Run sweeps by using python tests/tt_eager/python_api_testing/sweep_tests/run_pytorch_test.py -i tests/ttnn/python_api_testing/sweep_tests/test_configs/ci_sweep_tests_broken/grayskull/ttnn_eltwise_logaddexp_test.yaml -o ./result-sweeps
  4. After the run is completed all test sweeps results should be available inside specified output directory (in this case ./result-sweeps). There you will find .csv which holds all executed sweeps, among which you can also find the ones that failed and were recreated by the unit test, which you can get by searching unique data_seed field.
@jliangTT
Copy link

@umadevimcw

@jliangTT jliangTT added the P2 label Mar 15, 2024
@umadevimcw umadevimcw self-assigned this Apr 4, 2024
@umadevimcw
Copy link
Contributor

umadevimcw commented Apr 4, 2024

@npetrovic-tenstorrent @jliangTT Logically the code is working fine. Whenever one of the inputs dtype is different even for small range the PCC is very low. Also the logic of logaddexp involves three unique operations like log, add, and exp which might give only minimal drop in PCC. Also the logic of Exp has some instruction which is specific to fp16.

@jliangTT I think this needs some clarification datatype handling of Bfloat8 from TT. As same kind of issue is submitted for other ops also.
No logic changes requires in the logaddexp code

@tt-aho and @eyonland Please share your thoughts on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants