Skip to content

Commit

Permalink
OPT=99 IMAGE=2
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellgoffpc committed Sep 10, 2024
1 parent f32d7d7 commit b47774d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion selfdrive/modeld/runners/tinygradmodel.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit b47774d

Please sign in to comment.