ENCP / CNNdroid

Open Source Library for GPU-Accelerated Execution of Trained Deep Convolutional Neural Networks on Android
MIT License
539 stars 181 forks source link

Problems with renderscript when test the demo MyApplication in Android studio #13

Closed haibara-ai closed 7 years ago

haibara-ai commented 7 years ago

Hi,

When I ran the myapplication app demo in Android studio template, got the error info as below, I test the alexnet

D/CNNdroid: layers.conv1: Parameters Load Time in Constructor = 26
E/RenderScript: Unable to open shared library (/data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf4outf4.so): (null)
V/RenderScript: Invoking /system/bin/bcc with args '/system/bin/bcc -unroll-runtime -scalarize-load-store -rs-global-info -rs-global-info-skip-constant -o convrolledinf4outf4 -output_path /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache -bclib /system/lib/libclcore_x86.bc -mtriple i686-unknown-linux -O 3 -fPIC -embedRSInfo /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf4outf4.bc -build-checksum f21e7b3e'
V/RenderScript: Invoking /system/bin/ld.mc with args '/system/bin/ld.mc -shared -nostdlib /system/lib/libcompiler_rt.so -mtriple=i686-unknown-linux --library-path=/system/vendor/lib --library-path=/system/lib -lRSDriver -lm -lc /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf4outf4.o -o /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf4outf4.so'
D/CNNdroid: layers.conv1: Kernel Initialization Time in Constructor = 1728
D/CNNdroid: layers.conv2: Parameters Load Time in Constructor = 55
E/RenderScript: Unable to open shared library (/data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf8outf2.so): undefined symbol: init
V/RenderScript: Invoking /system/bin/bcc with args '/system/bin/bcc -unroll-runtime -scalarize-load-store -rs-global-info -rs-global-info-skip-constant -o convrolledinf8outf2 -output_path /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache -bclib /system/lib/libclcore_x86.bc -mtriple i686-unknown-linux -O 3 -fPIC -embedRSInfo /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf8outf2.bc -build-checksum 9780a453'
V/RenderScript: Invoking /system/bin/ld.mc with args '/system/bin/ld.mc -shared -nostdlib /system/lib/libcompiler_rt.so -mtriple=i686-unknown-linux --library-path=/system/vendor/lib --library-path=/system/lib -lRSDriver -lm -lc /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf8outf2.o -o /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf8outf2.so'
D/CNNdroid: layers.conv2: Kernel Initialization Time in Constructor = 140
D/CNNdroid: layers.conv3: Parameters Load Time in Constructor = 213
E/RenderScript: Unable to open shared library (/data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf8outf8.so): undefined symbol: init
V/RenderScript: Invoking /system/bin/bcc with args '/system/bin/bcc -unroll-runtime -scalarize-load-store -rs-global-info -rs-global-info-skip-constant -o convrolledinf8outf8 -output_path /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache -bclib /system/lib/libclcore_x86.bc -mtriple i686-unknown-linux -O 3 -fPIC -embedRSInfo /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf8outf8.bc -build-checksum d1c6d724'
V/RenderScript: Invoking /system/bin/ld.mc with args '/system/bin/ld.mc -shared -nostdlib /system/lib/libcompiler_rt.so -mtriple=i686-unknown-linux --library-path=/system/vendor/lib --library-path=/system/lib -lRSDriver -lm -lc /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf8outf8.o -o /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf8outf8.so'
D/CNNdroid: layers.conv3: Kernel Initialization Time in Constructor = 177
D/CNNdroid: layers.conv4: Parameters Load Time in Constructor = 154
E/RenderScript: Unable to open shared library (/data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf8outf4.so): undefined symbol: init
V/RenderScript: Invoking /system/bin/bcc with args '/system/bin/bcc -unroll-runtime -scalarize-load-store -rs-global-info -rs-global-info-skip-constant -o convrolledinf8outf4 -output_path /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache -bclib /system/lib/libclcore_x86.bc -mtriple i686-unknown-linux -O 3 -fPIC -embedRSInfo /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf8outf4.bc -build-checksum 4984b5ea'
V/RenderScript: Invoking /system/bin/ld.mc with args '/system/bin/ld.mc -shared -nostdlib /system/lib/libcompiler_rt.so -mtriple=i686-unknown-linux --library-path=/system/vendor/lib --library-path=/system/lib -lRSDriver -lm -lc /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/convrolledinf8outf4.o -o /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf8outf4.so'

                [ 03-01 07:28:35.992  1605: 1617 D/         ]
                HostConnection::get() New Host Connection established 0x8d67ee80, tid 1617
D/CNNdroid: layers.conv4: Kernel Initialization Time in Constructor = 204
D/CNNdroid: layers.conv5: Parameters Load Time in Constructor = 119
D/CNNdroid: layers.conv5: Kernel Initialization Time in Constructor = 11
D/CNNdroid: layers.fc6: Parameters Load Time in Constructor = 12493, Shape: 4096
E/RenderScript: Unable to open shared library (/data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.innerproductinf8outf1.so): undefined symbol: init
V/RenderScript: Invoking /system/bin/bcc with args '/system/bin/bcc -unroll-runtime -scalarize-load-store -rs-global-info -rs-global-info-skip-constant -o innerproductinf8outf1 -output_path /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache -bclib /system/lib/libclcore_x86.bc -mtriple i686-unknown-linux -O 3 -fPIC -embedRSInfo /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/innerproductinf8outf1.bc -build-checksum de802b7e'
V/RenderScript: Invoking /system/bin/ld.mc with args '/system/bin/ld.mc -shared -nostdlib /system/lib/libcompiler_rt.so -mtriple=i686-unknown-linux --library-path=/system/vendor/lib --library-path=/system/lib -lRSDriver -lm -lc /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/innerproductinf8outf1.o -o /data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.innerproductinf8outf1.so'
D/CNNdroid: layers.fc6: Kernel Initialization Time in Constructor = 432
D/CNNdroid: layers.fc7: Parameters Load Time in Constructor = 6814, Shape: 4096
D/CNNdroid: layers.fc7: Kernel Initialization Time in Constructor = 31
I/art: Background partial concurrent mark sweep GC freed 642(35KB) AllocSpace objects, 1(80MB) LOS objects, 1% free, 257MB/261MB, paused 127us total 189.647ms
D/CNNdroid: layers.fc8: Parameters Load Time in Constructor = 1781, Shape: 1000
D/CNNdroid: layers.fc8: Kernel Initialization Time in Constructor = 12

I got a lot of error info about E/RenderScript,

E/RenderScript: Unable to open shared library (/data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.convrolledinf4outf4.so): (null)
E/RenderScript: Unable to open shared library (/data/user_de/0/com.cnndroid.example/code_cache/com.android.renderscript.cache/librs.innerproductinf8outf1.so): undefined symbol: init
...

What's the problem? Thx!

latifisalar commented 7 years ago

Hi, This a runtime error of Renderscript library, it depends on the gradle version and the Android build-tools. If you search around, you'll see similar errors are also reported. Nevertheless, it has nothing to do with the rest of the process and you should be able to successfully run your network through CNNdroid.

haibara-ai commented 7 years ago

Thanks a lot.