@@ -65,22 +65,14 @@ common_model = lenv.Object(common_src)
6565if 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
8577lenv .Program ('_dmonitoringmodeld' , [
8678 "dmonitoringmodeld.cc" ,
0 commit comments