Comments (16)
Update-
Build is successfull.
Please let me know how to include ACL with any app.
such as i ma running ssd model, so should it be like "./SSD acl_opencl"?
As running ./build/tests/bin/bench_sqz -r1 gives error-
Register reference's operators
terminate called after throwing an instance of 'cl::Error'
what(): empty
Aborted
I am using Ubuntu18 with ACL version18.05.
Thanks.
from tengine.
Reference: document for ACL Driver
- Firstly, can you successfully run
./build/tests/bin/bench_sqz
with parameter-d acl_opencl
to set gpu as default device? - To include ACL with any app, call the function
set_default_device("acl_opencl")
in your own app just as tests/bin/bench_sqz.cpp do. - If running several graphs in one app is needed, replace
set_default_device
function withset_graph_device
to set different device for different graph.
from tengine.
Hi,
Thanks for the reply.
I don't know what is happening, i am using rockpro64 board (RK3399). I did checked out ACL vers 18.05 and built that. But now not able to build Tengine again. As according to https://github.com/OAID/Tengine/blob/master/doc/acl_driver.md
i remove build/driver and then build again. Now it is throwing error every time-
In file included from acl_graph_device.hpp:35:0,
from acl_graph_driver.hpp:36,
from acl_graph_driver.cpp:25:
acl_graph.hpp: In member function ‘bool TEngine::CLGraph::AddConvolutionLayer(TEngine::Node*)’:
acl_graph.hpp:360:23: error: no matching function for call to ‘arm_compute::ActivationLayerInfo::ActivationLayerInfo()’
ActivationLayerInfo act_info;
....
2)Second doubt is-
In Tengine/example/CMakeList, there is a line-
if( NOT ANDROID)
add_subdirectory(caffe_wrapper)
endif()
If i comment these lines then it successfully build (WITHOUT ACL), and if i uncomment these lines it through error of "cublas_v2.h" : no such file or directory.
from tengine.
Hi, rahulsharma11
- Just double check, make sure that your ACL version is v18.05? As I know, class
arm_compute::ActivationLayerInfo
is added default constructor with no parameters after v18.02. - If the version of ACL is right, try to reclone Tengine from github to your devices, check your path to ACL in
makefile.config
andmake clean && make -j4
again.
BTW, why not show your settings inmakefile.config
file which may help debug? - Confused,
cublas.h
seems a header for CUDA library, and I can't find any source code of Tengine withcublas.h
included. Can you show me more error information? For example, which source file includes it?
Thanks
from tengine.
Hi,
i did checkout v18.05 for ACL, and did make clean and make again for Tengine.
It is successfully built.
I also did Sudo make install in Tengine to build examples.
Now while building examples, i am getting the error for cublas error.
- Firstly i built caffe separately from-
https://github.com/BVLC/caffe
And did -
mkdir build
cd build
cmake ..
make all
make install
make runtest
Then while building examples, it was throwing error for caffe/caffe.h not found, so included the caffe path in CMakeList file in "Tengine/examples/caffe_wrapper/cpp_classification" and "Tengine/examples/caffe_wrapper/mtcnn". But now the error is for cublas again-
here is the output-
In file included from /home/rock64/rahul/caffe/include/caffe/common.hpp:19:0,
from /home/rock64/rahul/caffe/include/caffe/blob.hpp:8,
from /home/rock64/rahul/caffe/include/caffe/caffe.hpp:7,
from /home/rock64/rahul/Tengine/examples/caffe_wrapper/mtcnn/caffe_mtcnn.hpp:27,
from /home/rock64/rahul/Tengine/examples/caffe_wrapper/mtcnn/test_caffe_mtcnn.cpp:24:
/home/rock64/rahul/caffe/include/caffe/util/device_alternate.hpp:34:10: fatal error: cublas_v2.h: No such file or directory
#include <cublas_v2.h>
^~~~~~~~~~~~~
compilation terminated.
caffe_wrapper/mtcnn/CMakeFiles/CAFFE_MTCNN.dir/build.make:62: recipe for target 'caffe_wrapper/mtcnn/CMakeFiles/CAFFE_MTCNN.dir/test_caffe_mtcnn.cpp.o' failed
make[2]: *** [caffe_wrapper/mtcnn/CMakeFiles/CAFFE_MTCNN.dir/test_caffe_mtcnn.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/rock64/rahul/caffe/include/caffe/common.hpp:19:0,
from /home/rock64/rahul/caffe/include/caffe/blob.hpp:8,
from /home/rock64/rahul/caffe/include/caffe/caffe.hpp:7,
from /home/rock64/rahul/Tengine/examples/caffe_wrapper/mtcnn/caffe_mtcnn.hpp:27,
from /home/rock64/rahul/Tengine/examples/caffe_wrapper/mtcnn/caffe_mtcnn.cpp:24:
/home/rock64/rahul/caffe/include/caffe/util/device_alternate.hpp:34:10: fatal error: cublas_v2.h: No such file or directory
#include <cublas_v2.h>
from tengine.
Changes in makefile.config file for Tengine-
#Set the path of caffe used for compile and link,
#if caffe's operator calculation is enabled.
CAFFE_ROOT = /home/rock64/rahul/caffe
#Enable GPU support by Arm Computing Library
CONFIG_ACL_GPU=y
#Use BLAS as the operator implementation
CONFIG_ARCH_BLAS=y
#Set the path of ACL
ACL_ROOT=/home/rock64/rahul/ComputeLibrary
from tengine.
Hi, rahulsharma11
Maybe you did not uncomment CONFIG_CAFFE_REF=y
.
CONFIG_CAFFE_REF
and CAFFE_ROOT
should be setted at the same time.
from tengine.
Oh sry, i forget to mention that also.
Yes i did uncomment CONFIG_CAFFE_REF=y.
from tengine.
And again i got error for
./build/tests/bin/bench_sqz -r1 gives error-
Register reference's operators
terminate called after throwing an instance of 'cl::Error'
what(): empty
Aborted
Now i am building Tengine again without ACL to double check the result.
from tengine.
Try to comment CONFIG_CAFFE_REF=y
and CAFFE_ROOT
to not build the reference operators wrapped on Caffe, then rebuild Tengine and examples again.
from tengine.
Ok.
Will try that.
Also i confirm that if i build Tengine without ACL, then on ruuning "./build/tests/bin/bench_sqz -r1"
it gives successful results-
Register reference's operators
Register Driver: CaffeNode
Caffe Node Driver Initialized
Driver: CaffeNode probed 1 devices
tensor: prob created by node: prob is not consumed
add the node: prob into output list
Load model successfully
REPEAT COUNT= 1
Repeat [1] time 51573.00 us per RUN. used 51573 us
0.2763 - "n02123045 tabby, tabby cat"
0.2673 - "n02123159 tiger cat"
0.1766 - "n02119789 kit fox, Vulpes macrotis"
0.0827 - "n02124075 Egyptian cat"
0.0777 - "n02085620 Chihuahua"
Release Graph Executor for graph graph0
ALL TEST DONE
Release workspace default resource
And Examples are also build successfully.
from tengine.
Hi,
I rebuilt Tengine by commneting Caffe and uncommnet ACL in makefile.config.
Results-
Tengine successfully built.
Tengine examples built but after commenting the following in CMakeList.txt in Tengine/examples
if( NOT ANDROID)
add_subdirectory(caffe_wrapper)
endif()
Error-
./build/tests/bin/bench_sqz -r1 throws-
terminate called after throwing an instance of 'cl::Error'
what(): empty
Aborted
And if i uncomment the following in Tengine/examples CMakeList.txt
if( NOT ANDROID)
add_subdirectory(caffe_wrapper)
endif()
Then Tengine examples throws error-
/home/rock64/rahul/caffe/include/caffe/util/device_alternate.hpp:34:10: fatal error: cublas_v2.h: No such file or directory
#include <cublas_v2.h>
I guess there is something not working with the version.
from tengine.
It looks that it is probably that you forget to "make install" after building tengine library.
Would you please check that?
Thanks,
Haitao
from tengine.
Hi,
Yes i did "make install" after tengine make.
I have freshly cloned both Compute library and Tengine. Builded Computelibrary by-
"aarch64-linux-gnu-gcc opencl-1.2-stubs/opencl_stubs.c -Iinclude -shared -o build/libOpenCL.so
scons Werror=0 -j4 debug=0 asserts=1 neon=1 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
wget ftp://ftp.openailab.net/tools/script/Computelibrary/Makefile
sudo make install"
Then in Tengine makefile.config, provided the ACL path. Tengine is built successfully.
Issue is with Tengine/Eaxmples.
Can you please confirm this for examples?
I am getting same error-
terminate called after throwing an instance of 'cl::Error'
what(): empty
Aborted
Without ACL everything is fine.
Thanks,
from tengine.
Hi,
It seems that there is something wrong with ACL.
Try to rebuild it by following the document ARM Compute Library Driver
scons Werror=1 -j4 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
but not
arch64-linux-gnu-gcc opencl-1.2-stubs/opencl_stubs.c -Iinclude -shared -o build/libOpenCL.so scons Werror=0 -j4 debug=0 asserts=1 neon=1 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a wget ftp://ftp.openailab.net.cn/tools/script/Computelibrary/Makefile sudo make install
Thanks
from tengine.
Hi,
Now it is working.
What i did-
- Rebuild Compute library with "neon=0".
- Downloaded libmali from "https://goo.gl/25dk2r"
- linked /usr/lib/aarch64-linux-gnu/libOpenCL.so.1.0.0 with "libmali-midgaurd-t86-r14p0-fbdev.so" in lib folder.
Then it worked.
Thanks for the support.
from tengine.
Related Issues (20)
- yolov5 (no focus) int8 quant后,在嵌入式平台上跑到run_graph函数就挂了 HOT 7
- tengine+nvdla部署asic
- 请问现在Tengine支持rk3588吗 HOT 1
- 在运行timvx的yolov5s时,报错
- prelu在arm平台中不支持size = 1 的sclope
- 请问如何支持动态shape推理呢?
- 各位大佬,Tengine1.5-dev版本,使用官方提供的yolov5s.tmfile模型,在计算图预先运行时报错
- Tengine的convert脚本对ONNX文件进行转换时有很多底层算子不支持,onnx模型是通过.pth文件得到的,和设置的op_set版本号有关系吗?
- if support the iOS platform?
- 使用convert_tool将onnx模型转换为tmfile后发现一些层的输出不对
- 使用make编译convert_tool时遇到找不到头文件的问题
- 模型转换工具编译失败
- 数组越界访问
- 使用quant_tool_uint8 出现段错误Segmentation fault
- compile with rv64imafdc HOT 1
- 如何实现cpu range算子 HOT 1
- 设置 TG_DEBUG_DATA 会影响网络输出
- python代码如何加载.tmfile模型进行推理
- Integrate ZLUDA for AMD CUDA
- Tengine现在是不更新了吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tengine.