Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Simplify dependencies #2

Open
psyhtest opened this issue Dec 13, 2021 · 3 comments
Open

Simplify dependencies #2

psyhtest opened this issue Dec 13, 2021 · 3 comments
Assignees

Comments

@psyhtest
Copy link

According to the Arm NN SDK build environment Tutorial:

Arm NN deprecated support for the Quantizer, Caffe parser and TensorFlow parser
in the 21.02 release. These are removed in the 21.05 release.

We have never seriously used the Caffe and TensorFlow parsers, so that doesn't concern us much. We can remove them from the documentation at least.

The 21.08 release of Arm NN removes the Boost library dependency. You are not
required to install the Boost library with 21.08 or later releases.

That's good news. Boost is always a pain to build, plus it takes close to 1GB. We should make this dependency conditional on all releases prior to 21.08.

@psyhtest
Copy link
Author

Also, according to Arm, protobuf-host is only needed for the ONNX parser, so we can make it conditional on the onnx variation.

@psyhtest
Copy link
Author

Unfortunately, making Boost conditional is not as easy as I thought. Sure, we can include or exclude this dependency based on the package version, but we also have to make linking against Boost conditional in the client program, as otherwise it fails:

g++ -c    -I../ -DCK_HOST_OS_NAME2_LINUX=1 -DCK_HOST_OS_NAME_LINUX=1 -DCK_TARGET_OS_NAME2_LINUX=1 -DCK_TARGET_OS_NAME_LINUX=1 -std=c++14 -Wall -Wno-sign-compare -Wno-psabi -I/home/anton/CK-TOOLS/lib-armn
n-gcc-9.3.0-neon-rel.21.11-tflite-linux-64/install/include -I/home/anton/CK-TOOLS/lib-mlperf-loadgen-static-gcc-9.3.0-compiler.python-3.8.10-linux-64/include  ../classification.cpp  -o classification.o  
g++     classification.o  -o classification    -L/home/anton/CK-TOOLS/lib-armnn-gcc-9.3.0-neon-rel.21.11-tflite-linux-64/install/lib -larmnn   -L -lboost_log -lboost_filesystem -lboost_atomic -lboost_dat
e_time -lboost_regex -lboost_thread -lboost_chrono -lboost_system  -L/home/anton/CK-TOOLS/lib-armnn-gcc-9.3.0-neon-rel.21.11-tflite-linux-64/install/lib -larmnn -pthread -larmnnTfLiteParser  -L/home/anto
n/CK-TOOLS/lib-mlperf-loadgen-static-gcc-9.3.0-compiler.python-3.8.10-linux-64/lib -latomic -lmlperf_loadgen                                                                                               
/usr/bin/ld: cannot find -lboost_filesystem                                                          
/usr/bin/ld: cannot find -lboost_atomic                                                              
/usr/bin/ld: cannot find -lboost_date_time        
/usr/bin/ld: cannot find -lboost_regex                                                               
/usr/bin/ld: cannot find -lboost_thread                                                              
/usr/bin/ld: cannot find -lboost_chrono                                                              
/usr/bin/ld: cannot find -lboost_system           
collect2: error: ld returned 1 exit status

Unfortunately, CK does not support this easily.

See the program's meta:

 "extra_ld_vars": "$<<CK_ENV_LIB_TF_LIBS_DIRS>>$ $<<CK_ENV_LIB_TF_LIBS>>$ -L$<<CK_ENV_LIB_BOOST_LIB>>$ -lboost_log -lboost_filesystem -lboost_atomic -lboost_date_time -lboost_regex -lboost_thread -lboost_chrono -lboost_system $<<CK_ENV_LIB_ARMCL_CL_STUB_RPATH_LINK>>$ -L$<<CK_ENV_LIB_ARMNN_LIB>>$ -larmnn -pthread -larmnnTfLiteParser $<<CK_EXTRA_LIB_LOG>>$ -L$<<CK_ENV_LIB_MLPERF_LOADGEN_LIB>>$ -latomic -lmlperf_loadgen",

@psyhtest
Copy link
Author

I've made Boost conditional until the current release, so we can revisit this with the next release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants