Download code/conftest.py from changh95/gaze-lle-p150: direct link, hf CLI and curl.
- Browser
- Download file 996 Bytes
-
https://huggingface.co/changh95/gaze-lle-p150/resolve/main/code/conftest.py
- Command line
-
hf download hf://changh95/gaze-lle-p150/code/conftest.py
-
curl -L -o conftest.py https://huggingface.co/changh95/gaze-lle-p150/resolve/main/code/conftest.py
996 Bytes
| # SPDX-FileCopyrightText: (c) 2026 Tenstorrent AI ULC | |
| # SPDX-License-Identifier: Apache-2.0 | |
| """Minimal pytest fixtures for tt-Gaze-LLE. | |
| Provides a single-device ``device`` fixture so the gaze_lle tests can be run | |
| without the tt-metal monorepo's own conftest.py. The underlying device is | |
| selected with ``--device-id N`` on the pytest CLI or with the environment | |
| variable ``GAZE_LLE_DEVICE`` (default 0). Set ``TT_VISIBLE_DEVICES`` to | |
| constrain which PCIe chips ttnn enumerates at all. | |
| """ | |
| from __future__ import annotations | |
| import gc | |
| import os | |
| import pytest | |
| def _gc_between_tests(): | |
| gc.collect() | |
| def device(): | |
| import ttnn | |
| device_id = int(os.environ.get("GAZE_LLE_DEVICE", "0")) | |
| from gaze_lle.api import open_device as _gl_open_device # ETH dispatch + 1 CQ + 12x10 by default | |
| dev = _gl_open_device(device_id, dispatch=os.environ.get("GAZE_LLE_DISPATCH", "auto")) | |
| yield dev | |
| ttnn.close_device(dev) | |