Spaces:
Running
Running
Download tests/conftest.py from RDS777/TARGET_SPACE: direct link, hf CLI and curl.
- Browser
- Download file 348 Bytes
-
https://huggingface.co/spaces/RDS777/TARGET_SPACE/resolve/main/tests/conftest.py
- Command line
-
hf download hf://spaces/RDS777/TARGET_SPACE/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/RDS777/TARGET_SPACE/resolve/main/tests/conftest.py
348 Bytes
| import os | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parents[1])) | |
| try: # sans GPU, les noyaux Triton sont exécutés via l'interpréteur Triton | |
| import torch | |
| if not torch.cuda.is_available(): | |
| os.environ.setdefault("TRITON_INTERPRET", "1") | |
| except ImportError: # pragma: no cover | |
| pass | |