tenstorrent / tt-llk-bh

Tenstorrent low-level tensix kernels for Blackhole
Apache License 2.0
2 stars 0 forks source link

Enable ZeroAcc Dest Bank Detection #18

Open rtawfik01 opened 1 month ago

rtawfik01 commented 1 month ago

In Blackhole, ZEROACC instruction is able to automatically detect which Dest bank is being currently used, and to detect that bank and use it in dest offset calculation.

Currently to preserve legacy behaviour, the auto-detect behaviour has been disabled:

    // Legacy mode for ZEROACC 
    cfg_reg_rmw_tensix<DEST_ACCESS_CFG_zeroacc_absolute_tile_mode_RMW>(1);

in function: inline void _llk_math_hw_configure()

After having full blackhole functionality, we should re-enable auto-detection, this will change functions from this:

TT_ZEROACC(ZERO_ACC_MODE, 0/*clear fp32*/, 0, ADDR_MOD_1, ((get_dest_buffer_base() >> 4) + (dst_index << 2)) + (0 +         n)); // Clear faces 0 & 1

to this:

TT_ZEROACC(ZERO_ACC_MODE, 0/*clear fp32*/, 0, ADDR_MOD_1, ((dst_index << 2)) + (0 +         n)); // Clear faces 0 & 1
rtawfik01 commented 1 month ago

@ttmtrajkovic fyi