Download code/models/common/tests/test_device_utils.py from raahemnabeel/hy4-flash: direct link, hf CLI and curl.
- Browser
- Download file 655 Bytes
-
https://huggingface.co/raahemnabeel/hy4-flash/resolve/main/code/models/common/tests/test_device_utils.py
- Command line
-
hf download hf://raahemnabeel/hy4-flash/code/models/common/tests/test_device_utils.py
-
curl -L -o test_device_utils.py https://huggingface.co/raahemnabeel/hy4-flash/resolve/main/code/models/common/tests/test_device_utils.py
655 Bytes
| # SPDX-FileCopyrightText: © 2026 Tenstorrent AI ULC | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from types import SimpleNamespace | |
| import pytest | |
| import ttnn | |
| from models.common.device_utils import get_device_name | |
| def test_quasar_takes_the_blackhole_device_names(num_devices, expected): | |
| mesh_device = SimpleNamespace( | |
| arch=lambda: ttnn.device.Arch.QUASAR, | |
| get_num_devices=lambda: num_devices, | |
| dram_grid_size=lambda: SimpleNamespace(x=2), | |
| ) | |
| assert get_device_name(mesh_device) == expected | |