How to use NPU on Debian?


#1

Hi guys I’ve install Debian on my Hikey970

However when I try to use the SDK code it failed with log below, where can I get this libs ?

/usr/bin/ld: warning: libc_secshared.so, needed by ./lib64/libai_client.s[342/1837$
nd (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libhwbinder.so, needed by ./lib64/libai_client.so, not found
(try using -rpath or -rpath-link)
/usr/bin/ld: warning: libutils.so, needed by ./lib64/libai_client.so, not found (t$
y using -rpath or -rpath-link)
/usr/bin/ld: warning: liblog.so, needed by ./lib64/libai_client.so, not found (try
using -rpath or -rpath-link)
/usr/bin/ld: warning: libcutils.so, needed by ./lib64/libai_client.so, not found ($
ry using -rpath or -rpath-link)
/usr/bin/ld: warning: libhidlbase.so, needed by ./lib64/libai_client.so, not found
(try using -rpath or -rpath-link)
/usr/bin/ld: warning: libhidltransport.so, needed by ./lib64/libai_client.so, not $
ound (try using -rpath or -rpath-link)
/usr/bin/ld: warning: vendor.huawei.hardware.ai@1.0.so, needed by ./lib64/libai_cl$
ent.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: vendor.huawei.hardware.ai@1.1.so, needed by ./lib64/libai_cl$
ent.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libc++.so, needed by ./lib64/libai_client.so, not found (try
using -rpath or -rpath-link)
/usr/bin/ld: warning: libc.so, needed by ./lib64/libai_client.so, not found (try u$
ing -rpath or -rpath-link)
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiImageSegmentationListener::setHALInstrumentation()'
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiFstMaker::notifySyspropsChanged()'
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiSRListenerProxy::getDebugInfo(std::__1::function<void (android::hidl::base::V$
_0::DebugInfo const&)>)'
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiASR::interfaceChain(std::__1::function<void (android::hardware::hidl_vec<andr$
id::hardware::hidl_string> const&)>)'
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiSRListenerProxy::interfaceChain(std::__1::function<void (android::hardware::h$
dl_vec<android::hardware::hidl_string> const&)>)'
./lib64/libai_client.so: undefined reference to `fcntl@LIBC'
./lib64/libai_client.so: undefined reference to `android::hardware::hidl_string::c$
str() const'
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiImageClassification::castFrom(android::sp<vendor::huawei::hardware::ai::V1_0:$
IAiImageClassification> const&, bool)'
./lib64/libai_client.so: undefined reference to `pthread_mutex_init@LIBC'
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiFstMaker::ping()'
./lib64/libai_client.so: undefined reference to `vendor::huawei::hardware::ai::V1_$
::IAiFstMaker::getDebugInfo(std::__1::function<void (android::hidl::base::V1_0::De$

#2

Those warning come from trying to run an Android binary (which used bionic as its C library) on a system based on glibc (GNU C library).

As far as I am aware there is not currently an official release of Debian on Hikey970 so there are no NPU libraries available for glibc systems. It might be possible to load the Android binaries using libhybris although I can’t offer you a guide… I don’t think anybody has tried this on Hikey970.


#3

Thanks for your info.
Can’t wait for official Debian build released


#4

Any info about the release?