ONE
ONE copied to clipboard
strange behaviour : test with gpu_cl backend passed with undefined symbol
test with gpu_cl passed in recent CI :
For example, CI link shows the following successful test :
[2022-08-18T12:39:07.048Z] [ RUN ] GenModelTest.OneOp_Add_VarToVarSame
[2022-08-18T12:39:07.048Z] [ OK ] GenModelTest.OneOp_Add_VarToVarSame (56 ms)
However, if you download the artifact(http://13.125.34.93:8080/job/nnfw/job/master/job/pr-cross-runtime-test-pipeline-release/5706/artifact/Product/out/test-suite.tar.gz) from CI, libbackend_gpu_cl.so contains UND symbol. Due to this, inference fails like :
(this is log in rpi4/ubuntu)
ubuntu@ubuntu ~> Product/out/bin/nnpackage_run mobilenet_v1_1.0_224_quant/
Package Filename mobilenet_v1_1.0_224_quant/
Can't load libOpenCL.so: libOpenCL.so: cannot open shared object file: No such file or directory
Can't load libGLES_mali.so: libGLES_mali.so: cannot open shared object file: No such file or directory
Can't load libmali.so: libmali.so: cannot open shared object file: No such file or directory
Couldn't find any OpenCL library.
Product/out/bin/nnpackage_run: symbol lookup error: ./Product/out/lib/libbackend_gpu_cl.so: undefined symbol: _ZN4absl12lts_2021110212UnknownErrorENS0_11string_viewE
ubuntu@ubuntu ~> objdump -T Product/out/lib/libbackend_gpu_cl.so | grep absl | grep UND
00000000 D *UND* 00000000 _ZN4absl12lts_2021110220InvalidArgumentErrorENS0_11string_viewE
00000000 D *UND* 00000000 _ZN4absl12lts_2021110213NotFoundErrorENS0_11string_viewE
00000000 D *UND* 00000000 _ZN4absl12lts_202111026Status15UnrefNonInlinedEj
00000000 D *UND* 00000000 _ZN4absl12lts_2021110223FailedPreconditionErrorENS0_11string_viewE
00000000 D *UND* 00000000 _ZN4absl12lts_2021110216UnavailableErrorENS0_11string_viewE
00000000 D *UND* 00000000 _ZN4absl12lts_2021110218UnimplementedErrorENS0_11string_viewE
00000000 D *UND* 00000000 _ZN4absl12lts_2021110213InternalErrorENS0_11string_viewE
00000000 D *UND* 00000000 _ZN4absl12lts_2021110212UnknownErrorENS0_11string_viewE
ubuntu@ubuntu ~> c++filt _ZN4absl12lts_2021110212UnknownErrorENS0_11string_viewE
absl::lts_20211102::UnknownError(absl::lts_20211102::string_view)
Note that rpi4 does not have libOpenCL.so, thus gpu_cl backends is not runnable on rpi. But the error here should not be shown.
As a result, my final question is HOW the tests with gpu_cl backend passed on CI so far ?
The following path eliminates the error msg on the local :
(tf-2.8) ~/d/ONE> git diff
diff --git a/infra/cmake/packages/AbseilConfig.cmake b/infra/cmake/packages/AbseilConfig.cmake
index 7d1db8c48..a483f8388 100644
--- a/infra/cmake/packages/AbseilConfig.cmake
+++ b/infra/cmake/packages/AbseilConfig.cmake
@@ -36,6 +36,7 @@ function(_Abseil_import)
absl::synchronization
absl::time
absl::utility
+ absl::status
)
endif(NOT TARGET abseil)