tenstorrent / tt-metal

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

ttnn.remainder_bw binary inconsistent documentation regarding the input tensors layout #14291

Closed amalbasaTT closed 2 weeks ago

amalbasaTT commented 3 weeks ago

ttnn.remainder_bw binary doesn't support ROW_MAJOR layout despite what it says in the documentation. When any/all of the input tensors have ROW_MAJOR layout, the FATAL error "Inputs to eltwise binary must be tilized" is thrown.

To Reproduce Steps to reproduce the behavior: Sweep test for remainder_bw is located in 'tests/sweep_framework/sweeps/eltwise/binary_backward/remainder_bw/remainder_bw.py'

  1. Checkout branch amalbasaTT/backward_ops-sweeps-4 (soon to be merged to main)
  2. Go to 'tests/sweep_framework/sweeps/eltwise/binary_backward/remainder_bw/remainder_bw.py'
  3. Remove next lines of code from the invalidate_vector function:
    if test_vector["input_layout"] == ttnn.ROW_MAJOR_LAYOUT:
        return True, "Inputs to eltwise binary must be tilized"
  4. Generate new parameter vectors and run the sweep test
    python3 tests/sweep_framework/sweeps_parameter_generator.py --elastic cloud --module-name eltwise.binary_backward.remainder_bw.remainder_bw
    python3 tests/sweep_framework/sweeps_runner.py --elastic cloud --module-name eltwise.binary_backward.remainder_bw.remainder_bw 
  5. See error. Results can be found on elastic cloud as explained here: https://github.com/tenstorrent/tt-metal/tree/main/tests/sweep_framework

Expected behavior For vectors with input_layout being ROW_MAJOR_LAYOUT, test will fail with the message "Inputs to eltwise binary must be tilized"

mouliraj-mcw commented 2 weeks ago

Doc has been Updated with Layout issue

Screenshot 2024-10-30 at 10 19 49 AM