mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 14:13:53 +08:00
bump tinygrad (#35208)
* bump tinygrad * fix * why is mac different? * fix sim * relax that
This commit is contained in:
2
.gitmodules
vendored
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]]
|
||||
|
||||
Submodule tinygrad_repo updated: 0e34f9082e...ddff9857b8
Reference in New Issue
Block a user