Skip to content

mul_reduce_scalar_tile does not work correctly in half dest mode #37535

@tt-aho

Description

@tt-aho

In mul_reduce_scalar_tile there is code for setting the dest offset in _llk_math_mul_reduce_scalar_move_dest_to_src_.

        if (idst == 0)
        {
            TTI_SETC16(DEST_TARGET_REG_CFG_MATH_Offset_ADDR32, 0);
            TTI_SETRWC(p_setrwc::CLR_NONE, 0, 0, 0, 0, p_setrwc::SET_D);
        }

This is incorrect because it does not track which half of dest we are in, and it's always hardcoded to the very start of dest.
Unit tests didn't initially show the issue because as the first op it was always in the first half of dest, but when fused with other ops we saw output issues because it was supposed to operate on the 2nd half when it is hardcoded to the first half.
The fix should be to switch TTI_SETC16(DEST_TARGET_REG_CFG_MATH_Offset_ADDR32, 0); to TT_SETC16(DEST_TARGET_REG_CFG_MATH_Offset_ADDR32, get_dest_buffer_base());

Might also indicate we want better testing of LLK apis with half dest to avoid these issues in the future.

Metadata

Metadata

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions