From 3dee3e096e797a630e199e67e454e61801ed96ff Mon Sep 17 00:00:00 2001 From: mitchellgoffpc Date: Tue, 10 Sep 2024 14:21:15 -0700 Subject: [PATCH] OPT=99 IMAGE=2 --- selfdrive/modeld/runners/tinygradmodel.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/selfdrive/modeld/runners/tinygradmodel.py b/selfdrive/modeld/runners/tinygradmodel.py index f54308e1fd19d1..9de1a37abcf6e8 100644 --- a/selfdrive/modeld/runners/tinygradmodel.py +++ b/selfdrive/modeld/runners/tinygradmodel.py @@ -1,6 +1,7 @@ import os import sys from pathlib import Path + OPENPILOT_ROOT = Path(__file__).parent.parent.parent.parent if not (OPENPILOT_ROOT / 'tinygrad_repo').exists(): OPENPILOT_ROOT = OPENPILOT_ROOT.parent # This takes us from openpilot/openpilot to openpilot but it's probably wrong @@ -9,7 +10,12 @@ assert (TINYGRAD_REPO_PATH / 'extra').exists() sys.path.append(str(TINYGRAD_REPO_PATH)) -os.environ['GPU'] = '1' +if os.getenv("OPT", None) is None: + os.environ['OPT'] = '99' +if os.getenv("GPU", None) is None: + os.environ['GPU'] = '1' +if os.getenv("IMAGE", None) is None: + os.environ['IMAGE'] = '2' import onnx import numpy as np