Open amalbasaTT opened 1 day ago
@amalbasaTT isn't this issue similar to #15159 ?
Not exactly, issue you are mentioning has clear conditions which when met are always reproducing said issue, and that is when using sharding strategies and when the second to innermost dimension is not divisible by 32. This issue happens in some cases when using column major orientation and tensor height width as shard shape. But i typed the wrong title, so I'll fix that.
To Reproduce Steps to reproduce the behavior:
from tests.sweep_framework.sweep_utils.utils import gen_shapes, get_device_grid_size, get_sharded_config from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt, _gen_reshape_args_from_volume from tests.ttnn.utils_for_testing import check_with_pcc from models.utility_functions import torch_random
Y, X = get_device_grid_size() DEVICE_GRID_SIZE = ttnn.CoreGrid(y=Y, x=X)
def run_relu_sharded_tests( input_shape, dtype, dlayout, core_size, tensor_height_width_as_shard_shape, shard_orientation, data_seed, device, ): torch.manual_seed(data_seed)
test_sweep_args = [ ( [3, 2, 256, 320], ttnn.bfloat16, ttnn.TILE_LAYOUT, (8, 1), True, ttnn.ShardOrientation.COL_MAJOR, 5863207, ), ( [3, 2, 256, 320], ttnn.bfloat8_b, ttnn.TILE_LAYOUT, (8, 1), True, ttnn.ShardOrientation.COL_MAJOR, 8320078, ), ( [288, 32], ttnn.bfloat16, ttnn.TILE_LAYOUT, (8, 1), True, ttnn.ShardOrientation.COL_MAJOR, 11924152, ), ( [2, 3, 224, 64], ttnn.bfloat16, ttnn.TILE_LAYOUT, (8, 1), True, ttnn.ShardOrientation.COL_MAJOR, 14234094, ), ( [2, 3, 224, 64], ttnn.bfloat8_b, ttnn.TILE_LAYOUT, (8, 1), True, ttnn.ShardOrientation.COL_MAJOR, 15818731, ), ( [16, 256, 128], ttnn.bfloat16, ttnn.TILE_LAYOUT, (2, 8), True, ttnn.ShardOrientation.COL_MAJOR, 3965624, ), ( [16, 256, 128], ttnn.bfloat8_b, ttnn.TILE_LAYOUT, (2, 8), True, ttnn.ShardOrientation.COL_MAJOR, 17790071, ), ]
@pytest.mark.parametrize( "input_shape, dtype, dlayout, core_size, tensor_height_width_as_shard_shape, shard_orientation, data_seed", (test_sweep_args), ) def test_relu_sharded(input_shape, dtype, dlayout, core_size, tensor_height_width_as_shard_shape, shard_orientation, data_seed, device): run_relu_sharded_tests(input_shape, dtype, dlayout, core_size, tensor_height_width_as_shard_shape, shard_orientation, data_seed, device)
pytest test_relu_sharded.py
Expected behavior All test cases should fail.