mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-21 08:03:42 +08:00
thneed: add flag to enable optimizer (#24568)
* improve the thneed compiler * only init thneed if we are using the GPU Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
@@ -65,7 +65,7 @@ common_model = lenv.Object(common_src)
|
||||
if use_thneed and arch == "larch64":
|
||||
fn = File("models/supercombo").abspath
|
||||
compiler = lenv.Program('thneed/compile', ["thneed/compile.cc"]+common_model, LIBS=libs)
|
||||
cmd = f"cd {Dir('.').abspath} && {compiler[0].abspath} {fn}.dlc {fn}_badweights.thneed --binary"
|
||||
cmd = f"cd {Dir('.').abspath} && {compiler[0].abspath} --in {fn}.dlc --out {fn}_badweights.thneed --binary --optimize"
|
||||
|
||||
lib_paths = ':'.join(Dir(p).abspath for p in lenv["LIBPATH"])
|
||||
kernel_path = os.path.join(Dir('.').abspath, "thneed", "kernels")
|
||||
|
||||
Reference in New Issue
Block a user