From 44ab494c4105660b272a79fbce5d853235b2d30d Mon Sep 17 00:00:00 2001 From: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com> Date: Fri, 2 May 2025 23:50:40 -0700 Subject: [PATCH] BUG FIX: Fix .thneed model runners (#871) Add support for thneed library and thneedmodel integration Co-authored-by: DevTekVE --- sunnypilot/modeld/SConscript | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sunnypilot/modeld/SConscript b/sunnypilot/modeld/SConscript index bebd2de95..df897e304 100644 --- a/sunnypilot/modeld/SConscript +++ b/sunnypilot/modeld/SConscript @@ -52,3 +52,8 @@ commonmodel_lib = lenv.Library('commonmodel', common_src) lenvCython.Program('runners/runmodel_pyx.so', 'runners/runmodel_pyx.pyx', LIBS=cython_libs, FRAMEWORKS=frameworks) lenvCython.Program('runners/snpemodel_pyx.so', 'runners/snpemodel_pyx.pyx', LIBS=[snpemodel_lib, snpe_lib, *cython_libs], FRAMEWORKS=frameworks, RPATH=snpe_rpath) lenvCython.Program('models/commonmodel_pyx.so', 'models/commonmodel_pyx.pyx', LIBS=[commonmodel_lib, *cython_libs], FRAMEWORKS=frameworks) + +if arch == "larch64": + 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']) \ No newline at end of file