quest-35b-rl / code /models /tt_transformers /tests /test_rope_utils.py
raahemnabeel's picture
tt-model push quest-35b-rl (container) (part 3)
a488f21 verified
Raw History Blame Contribute Delete
653 Bytes
# SPDX-FileCopyrightText: © 2026 Tenstorrent USA, Inc.
#
# SPDX-License-Identifier: Apache-2.0
import pytest
from models.tt_transformers.tt.rope import get_batch_size_per_device_group
@pytest.mark.parametrize(
("batch_size", "use_qk_fused", "num_devices", "mesh_shape", "expected"),
[
(1, True, 32, (8, 4), 2),
(1, False, 32, (8, 4), 1),
(32, True, 32, (8, 4), 16),
(1, True, 1, (), 2),
],
)
def test_get_batch_size_per_device_group(batch_size, use_qk_fused, num_devices, mesh_shape, expected):
assert get_batch_size_per_device_group(batch_size, use_qk_fused, num_devices, mesh_shape, 1) == expected