bump tinygrad (#35208)

* bump tinygrad

* fix

* why is mac different?

* fix sim

* relax that
pull/35172/head
Adeeb Shihadeh 6 days ago committed by GitHub
parent 313ede3d1e
commit 67486ff92d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .gitmodules
  2. 4
      selfdrive/modeld/SConscript
  3. 5
      selfdrive/modeld/modeld.py
  4. 2
      selfdrive/test/test_onroad.py
  5. 2
      tinygrad_repo

2
.gitmodules vendored

@ -15,4 +15,4 @@
url = ../../commaai/teleoprtc
[submodule "tinygrad"]
path = tinygrad_repo
url = https://github.com/commaai/tinygrad.git
url = https://github.com/tinygrad/tinygrad.git

@ -43,9 +43,9 @@ pythonpath_string = 'PYTHONPATH="${PYTHONPATH}:' + env.Dir("#tinygrad_repo").abs
if arch == 'larch64':
device_string = 'QCOM=1'
elif arch == 'Darwin':
device_string = 'CLANG=1 IMAGE=0'
device_string = 'CLANG=1 IMAGE=0 JIT=2'
else:
device_string = 'LLVM=1 LLVMOPT=1 BEAM=0 IMAGE=0'
device_string = 'LLVM=1 LLVMOPT=1 BEAM=0 IMAGE=0 JIT=2'
for model_name in ['driving_vision', 'driving_policy', 'dmonitoring_model']:
fn = File(f"models/{model_name}").abspath

@ -1,13 +1,14 @@
#!/usr/bin/env python3
import os
from openpilot.system.hardware import TICI
from tinygrad.tensor import Tensor
from tinygrad.dtype import dtypes
if TICI:
from openpilot.selfdrive.modeld.runners.tinygrad_helpers import qcom_tensor_from_opencl_address
os.environ['QCOM'] = '1'
else:
os.environ['LLVM'] = '1'
os.environ['JIT'] = '2'
from tinygrad.tensor import Tensor
from tinygrad.dtype import dtypes
import time
import pickle
import numpy as np

@ -398,7 +398,7 @@ class TestOnroad:
("modelV2", 0.06, 0.040),
# can miss cycles here and there, just important the avg frequency is 20Hz
("driverStateV2", 0.2, 0.05),
("driverStateV2", 0.3, 0.05),
]
for (s, instant_max, avg_max) in cfgs:
ts = [getattr(m, s).modelExecutionTime for m in self.msgs[s]]

@ -1 +1 @@
Subproject commit 0e34f9082e9730b5df9c055b094a43e4565e413b
Subproject commit ddff9857b8527c16e5917eeec2dc55da69fa74d2
Loading…
Cancel
Save