tt-metal: [Blackhole Bringup] Update tests to blackhole grid/block sizes

Some tests need to get updated to use blackhole grids, and ensure correct kernels are being used. For example:

TT_METAL_DPRINT_CORES=0,0 pytest -svv tests/ttnn/unit_tests/test_to_layout.py::test_to_layout_2D[start_with_padding=False-to_layout=Layout.ROW_MAJOR-from_layout=Layout.TILE-on_device=True-width=32-height=32]

Generates 2 different kernels for different devices.

For wormhole_b0 it generates:

ttnn/cpp/ttnn/operations/data_movement/untilize/device/kernels/compute/pack_untilize.cpp

with per_core_block_cnt = 1 and per_core_block_tile_cnt=1

while for Blackhole it generates:

ttnn/cpp/ttnn/operations/data_movement/untilize/device/kernels/compute/untilize.cpp

with per_core_block_cnt = 1 and per_core_block_tile_cnt=32 The per_core_block_tile_cnt=32 is incorrect, since this test is only a single 32x32 tile, but it generates incorrectly for Blackhole device. Seems like potential issue is from here:

    std::string compute_kernel("ttnn/cpp/ttnn/operations/data_movement/untilize/device/kernels/compute/pack_untilize.cpp");
    if (ntiles_per_block > MAX_PACK_UNTILIZE_WIDTH || !use_pack_untilize) {
        log_debug(tt::LogOp, "Using slow untilize.");
        compute_kernel = std::string("ttnn/cpp/ttnn/operations/data_movement/untilize/device/kernels/compute/untilize.cpp");
    } else {
        log_debug(tt::LogOp, "Using fast pack untilize.");
    }

All potential tests that use the above kernels should be updated for Blackhole.

@tarafdarTT @ttmtrajkovic fyi

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

With the latest main, when I try the above maxpool test, I get a different error:

                 Always | FATAL    | Generated prefetcher command of size 131136 B exceeds max command size 131072 B
FAILED

Any idea about this @abhullar-tt ? I don’t know much about prefetcher commands.

Fix is on https://github.com/tenstorrent/tt-metal/pull/11983