From 51066175f5bc5b928e24d382756c809505926a72 Mon Sep 17 00:00:00 2001 From: mitchellgoffpc Date: Thu, 31 Aug 2023 13:11:39 -0700 Subject: [PATCH] Set ADSP_LIBRARY_PATH in snpemodel_pyx old-commit-hash: 18526c58b65959ebcaea9a07e84a55315d10508e --- selfdrive/modeld/runners/snpemodel_pyx.pyx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/selfdrive/modeld/runners/snpemodel_pyx.pyx b/selfdrive/modeld/runners/snpemodel_pyx.pyx index a454aa7b92..c3b2b7e9bd 100644 --- a/selfdrive/modeld/runners/snpemodel_pyx.pyx +++ b/selfdrive/modeld/runners/snpemodel_pyx.pyx @@ -1,6 +1,7 @@ # distutils: language = c++ # cython: c_string_encoding=ascii +import os from libcpp cimport bool from libcpp.string cimport string @@ -9,6 +10,8 @@ from selfdrive.modeld.models.commonmodel_pyx cimport CLContext from selfdrive.modeld.runners.runmodel_pyx cimport RunModel from selfdrive.modeld.runners.runmodel cimport RunModel as cppRunModel +os.environ['ADSP_LIBRARY_PATH'] = "/data/pythonpath/third_party/snpe/dsp/" + cdef class SNPEModel(RunModel): def __cinit__(self, string path, float[:] output, int runtime, bool use_tf8, CLContext context): self.model = new cppSNPEModel(path, &output[0], len(output), runtime, use_tf8, context.context)