mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
more fix
This commit is contained in:
@@ -62,10 +62,10 @@ lenv.Command(fn + "_metadata.pkl", [fn + ".onnx"] + tinygrad_files, cmd)
|
||||
# Build thneed model
|
||||
pythonpath_string = 'PYTHONPATH="${PYTHONPATH}:' + env.Dir("#sunnypilot/tinygrad_repo").abspath + '"'
|
||||
if arch == "larch64" or GetOption('pc_thneed'):
|
||||
tinygrad_opts = []
|
||||
tinygrad_opts = ''
|
||||
if not GetOption('pc_thneed'):
|
||||
# use FLOAT16 on device for speed + don't cache the CL kernels for space
|
||||
tinygrad_opts += ["FLOAT16=1", "PYOPENCL_NO_CACHE=1"]
|
||||
tinygrad_opts = 'FLOAT16=1 PYOPENCL_NO_CACHE=1'
|
||||
cmd = f'{pythonpath_string} {tinygrad_opts} python3 {Dir("#sunnypilot/tinygrad_repo").abspath}/openpilot/compile2.py {fn}.onnx {fn}.thneed'
|
||||
|
||||
lenv.Command(fn + ".thneed", [fn + ".onnx"] + tinygrad_files, cmd)
|
||||
|
||||
Reference in New Issue
Block a user