Tinygrad: use compile2 (#30400)
* Tinygrad: use compile2 * unused * compile2 file * slightly different * Revert "slightly different" This reverts commit 8a470ecab40c295f3b8c777b82cb7a22890d116e. * slightly different ref * add release file * rm default args
This commit is contained in:
parent
11855eab5d
commit
c9fae805bc
|
@ -582,15 +582,15 @@ opendbc/tesla_can.dbc
|
||||||
opendbc/tesla_radar.dbc
|
opendbc/tesla_radar.dbc
|
||||||
opendbc/tesla_powertrain.dbc
|
opendbc/tesla_powertrain.dbc
|
||||||
|
|
||||||
tinygrad_repo/openpilot/compile.py
|
tinygrad_repo/openpilot/compile2.py
|
||||||
tinygrad_repo/extra/onnx.py
|
tinygrad_repo/extra/onnx.py
|
||||||
tinygrad_repo/extra/onnx_ops.py
|
tinygrad_repo/extra/onnx_ops.py
|
||||||
tinygrad_repo/extra/thneed.py
|
tinygrad_repo/extra/thneed.py
|
||||||
tinygrad_repo/extra/utils.py
|
tinygrad_repo/extra/utils.py
|
||||||
tinygrad_repo/tinygrad/codegen/kernel.py
|
tinygrad_repo/tinygrad/codegen/kernel.py
|
||||||
tinygrad_repo/tinygrad/codegen/linearizer.py
|
tinygrad_repo/tinygrad/codegen/linearizer.py
|
||||||
tinygrad_repo/tinygrad/codegen/optimizer.py
|
|
||||||
tinygrad_repo/tinygrad/features/image.py
|
tinygrad_repo/tinygrad/features/image.py
|
||||||
|
tinygrad_repo/tinygrad/features/search.py
|
||||||
tinygrad_repo/tinygrad/nn/*
|
tinygrad_repo/tinygrad/nn/*
|
||||||
tinygrad_repo/tinygrad/renderer/cstyle.py
|
tinygrad_repo/tinygrad/renderer/cstyle.py
|
||||||
tinygrad_repo/tinygrad/renderer/opencl.py
|
tinygrad_repo/tinygrad/renderer/opencl.py
|
||||||
|
|
|
@ -58,11 +58,11 @@ lenv.Command(fn + "_metadata.pkl", [fn + ".onnx"]+files, cmd)
|
||||||
|
|
||||||
# Build thneed model
|
# Build thneed model
|
||||||
if arch == "larch64" or GetOption('pc_thneed'):
|
if arch == "larch64" or GetOption('pc_thneed'):
|
||||||
tinygrad_opts = ["NOLOCALS=1", "IMAGE=2", "GPU=1"]
|
tinygrad_opts = []
|
||||||
if not GetOption('pc_thneed'):
|
if not GetOption('pc_thneed'):
|
||||||
# use FLOAT16 on device for speed + don't cache the CL kernels for space
|
# 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"cd {Dir('#').abspath}/tinygrad_repo && " + ' '.join(tinygrad_opts) + f" python3 openpilot/compile.py {fn}.onnx {fn}.thneed"
|
cmd = f"cd {Dir('#').abspath}/tinygrad_repo && " + ' '.join(tinygrad_opts) + f" python3 openpilot/compile2.py {fn}.onnx {fn}.thneed"
|
||||||
|
|
||||||
tinygrad_files = sum([lenv.Glob("#"+x) for x in open(File("#release/files_common").abspath).read().split("\n") if x.startswith("tinygrad_repo/")], [])
|
tinygrad_files = sum([lenv.Glob("#"+x) for x in open(File("#release/files_common").abspath).read().split("\n") if x.startswith("tinygrad_repo/")], [])
|
||||||
lenv.Command(fn + ".thneed", [fn + ".onnx"] + tinygrad_files, cmd)
|
lenv.Command(fn + ".thneed", [fn + ".onnx"] + tinygrad_files, cmd)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
ca18755cd1a1bc28c06e85a280d79d7e48a8438c
|
d1212a1ac9119a1be33f2e375b1421344379ec08
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5a4a62ecaecb2bfd8bb0f77033aca46df4e668bd
|
Subproject commit ae5d1407ee844a97a52ad3756835d38e7e2b9e1b
|
Loading…
Reference in New Issue