From 6e82d0d2cce1aa6be09672eed453c525ba45c423 Mon Sep 17 00:00:00 2001 From: mitchellgoffpc Date: Tue, 10 Sep 2024 13:40:55 -0700 Subject: [PATCH] Update sconscript --- selfdrive/modeld/SConscript | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/selfdrive/modeld/SConscript b/selfdrive/modeld/SConscript index d572915c721a48b..f61d277ab23beb8 100644 --- a/selfdrive/modeld/SConscript +++ b/selfdrive/modeld/SConscript @@ -13,15 +13,6 @@ common_src = [ "transforms/transform.cc", ] -thneed_src_common = [ - "thneed/thneed_common.cc", - "thneed/serialize.cc", -] - -thneed_src_qcom = thneed_src_common + ["thneed/thneed_qcom2.cc"] -thneed_src_pc = thneed_src_common + ["thneed/thneed_pc.cc"] -thneed_src = thneed_src_qcom if arch == "larch64" else thneed_src_pc - # SNPE except on Mac and ARM Linux snpe_lib = [] if arch != "Darwin" and arch != "aarch64": @@ -58,17 +49,3 @@ tinygrad_files = ["#"+x for x in glob.glob(env.Dir("#tinygrad_repo").relpath + " fn = File("models/supercombo").abspath cmd = f'python3 {Dir("#selfdrive/modeld").abspath}/get_model_metadata.py {fn}.onnx' lenv.Command(fn + "_metadata.pkl", [fn + ".onnx"] + tinygrad_files, cmd) - -# Build thneed model -if arch == "larch64" or GetOption('pc_thneed'): - 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"] - cmd = f"cd {Dir('#').abspath}/tinygrad_repo && " + ' '.join(tinygrad_opts) + f" python3 openpilot/compile2.py {fn}.onnx {fn}.thneed" - - lenv.Command(fn + ".thneed", [fn + ".onnx"] + tinygrad_files, cmd) - - thneed_lib = env.SharedLibrary('thneed', thneed_src, LIBS=[gpucommon, common, 'OpenCL', 'dl']) - thneedmodel_lib = env.Library('thneedmodel', ['runners/thneedmodel.cc']) - lenvCython.Program('runners/thneedmodel_pyx.so', 'runners/thneedmodel_pyx.pyx', LIBS=envCython["LIBS"]+[thneedmodel_lib, thneed_lib, gpucommon, common, 'dl', 'OpenCL'])