mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-07-26 11:52:04 +08:00
2d4ac33ed7
* modeld: dedupe weight accross resolutions * cleanup * rm compileconfig * depends on camera targets * dedupe doesn't work on qcom as is
13 lines
356 B
Python
13 lines
356 B
Python
import json
|
|
import os
|
|
from pathlib import Path
|
|
|
|
MODELS_DIR = Path(__file__).resolve().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'])
|