54e6124925
version: sunnypilot v2026.001.000 (dev) date: 2026-05-07T23:07:19 master commit: c28eb958740187620f2282023b8f1997cf90f583
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'])
|