Skip to content

Commit cc2ba58

Browse files
geohotComma Deviceharaschax
authored andcommitted
remove weights fixup with new SNPE (commaai#24254)
* remove weights fixup with new SNPE * Update ref Co-authored-by: Comma Device <[email protected]> Co-authored-by: Harald Schafer <[email protected]>
1 parent 7bb7c94 commit cc2ba58

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

selfdrive/modeld/SConscript

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,14 @@ common_model = lenv.Object(common_src)
6565
if use_thneed and arch == "larch64":
6666
fn = File("models/supercombo").abspath
6767
compiler = lenv.Program('thneed/compile', ["thneed/compile.cc"]+common_model, LIBS=libs)
68-
cmd = f"cd {Dir('.').abspath} && {compiler[0].abspath} --in {fn}.dlc --out {fn}_badweights.thneed --binary --optimize"
68+
cmd = f"cd {Dir('.').abspath} && {compiler[0].abspath} --in {fn}.dlc --out {fn}.thneed --binary --optimize"
6969

7070
lib_paths = ':'.join(Dir(p).abspath for p in lenv["LIBPATH"])
7171
kernel_path = os.path.join(Dir('.').abspath, "thneed", "kernels")
7272
cenv = Environment(ENV={'LD_LIBRARY_PATH': f"{lib_paths}:{lenv['ENV']['LD_LIBRARY_PATH']}", 'KERNEL_PATH': kernel_path})
7373

7474
kernels = [os.path.join(kernel_path, x) for x in os.listdir(kernel_path) if x.endswith(".cl")]
75-
cenv.Command(fn + "_badweights.thneed", [fn + ".dlc", kernels, compiler], cmd)
76-
77-
from selfdrive.modeld.thneed.weights_fixup import weights_fixup
78-
def weights_fixup_action(target, source, env):
79-
weights_fixup(target[0].abspath, source[0].abspath, source[1].abspath)
80-
81-
env = Environment(BUILDERS = {'WeightFixup' : Builder(action = weights_fixup_action)})
82-
env.WeightFixup(target=fn + ".thneed", source=[fn+"_badweights.thneed", fn+".dlc"])
83-
75+
cenv.Command(fn + ".thneed", [fn + ".dlc", kernels, compiler], cmd)
8476

8577
lenv.Program('_dmonitoringmodeld', [
8678
"dmonitoringmodeld.cc",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f74ab97371be93fdc28333e5ea12bbb78c3a32d0
1+
512a9d4596c8faba304d6f7ded2ce77837357b65

0 commit comments

Comments
 (0)