Download code/models/common/tests/test_device_utils.py from changh95/gemma4-31b-it-dflash: direct link, hf CLI and curl.
- Browser
- Download file 655 Bytes
-
https://huggingface.co/changh95/gemma4-31b-it-dflash/resolve/main/code/models/common/tests/test_device_utils.py
- Command line
-
hf download hf://changh95/gemma4-31b-it-dflash/code/models/common/tests/test_device_utils.py
-
curl -L -o test_device_utils.py https://huggingface.co/changh95/gemma4-31b-it-dflash/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 | |