6e2ccc8b15
version: sunnypilot v2026.002.000 (staging) date: 2026-05-27T04:05:25 master commit: dfc3c98b226da57a653daf57131a8a3d66166fcb
13 lines
346 B
Python
13 lines
346 B
Python
import json
|
|
import os
|
|
from pathlib import Path
|
|
|
|
MODELS_DIR = Path(__file__).parent / 'models'
|
|
COMPILED_FLAGS_PATH = MODELS_DIR / 'tg_compiled_flags.json'
|
|
|
|
|
|
def set_tinygrad_backend_from_compiled_flags() -> None:
|
|
if os.path.isfile(COMPILED_FLAGS_PATH):
|
|
with open(COMPILED_FLAGS_PATH) as f:
|
|
os.environ['DEV'] = str(json.load(f)['DEV'])
|