Tencent / TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

opencl的premute崩溃 code: 0x9004 msg: unsupported data format for device acc Segmentation fault

TD-wzw opened this issue · comments

commented

1. 环境(environment)

  • Build OS and Version: Ubuntu 18.04
  • RunTime OS Version: Android
  • RunTime DEVICE: OPENCL

 **5. 详细描述bug 情况 (Describe the bug)**
 在opencl运行crnn模型时,premute层崩溃

 **6. 运行日志(runtime log)**
rk3399_all:/data/local/tmp # ./crnn
I/tnn: tnn::Status tnn::OpenCLRuntime::Init() [File source/tnn/device/opencl/opencl_runtime.cc][Line 124] OpenCL version: CL_TARGET_OPENCL_VERSION 200   CL_HPP_TARGET_OPENCL_VERSION 120   CL_HPP_MINIMUM_OPENCL_VERSION 110
E/tnn: bool tnn::OpenCLSymbols::LoadLibraryFromPath(const std::string &) [File source/tnn/device/opencl/opencl_wrapper.cc][Line 257] load func (clEnqueueAcquireGLObjects) from (libOpenCL.so) failed!
E/tnn: bool tnn::OpenCLSymbols::LoadLibraryFromPath(const std::string &) [File source/tnn/device/opencl/opencl_wrapper.cc][Line 258] load func (clEnqueueReleaseGLObjects) from (libOpenCL.so) failed!
E/tnn: bool tnn::OpenCLSymbols::LoadLibraryFromPath(const std::string &) [File source/tnn/device/opencl/opencl_wrapper.cc][Line 259] load func (clCreateFromGLTexture) from (libOpenCL.so) failed!
I/tnn: tnn::Status tnn::OpenCLRuntime::Init() [File source/tnn/device/opencl/opencl_runtime.cc][Line 167] Create common opencl context
E/tnn: tnn::Status tnn::OpenCLLayerAcc::CheckBlob(const std::vector<Blob *> &, const std::vector<Blob *> &) [File source/tnn/device/opencl/acc/opencl_layer_acc.cc][Line 439] Resolve Layer(Transpose_3)-Output Blob(transpose_1.tmp_0) Data Format(0) failed
E/tnn: virtual tnn::Status tnn::OpenCLPermuteLayerAcc::Reshape(const std::vector<Blob *> &, const std::vector<Blob *> &) [File source/tnn/device/opencl/acc/opencl_permute_layer_acc.cc][Line 103] code: 0x9004 msg: unsupported data format for device acc
Segmentation fault

commented

再补充一下:崩溃是因为要用动态尺寸去推理,在CreateInst这个阶段事先申请了比较大的内存,如果内存申请小一点就不会崩溃,但推理结果是错误的。
看这个崩溃的日志是说unsupported data format for device acc,这个信息是否准确可靠?是不是在这之前就已经崩掉了,只是没有退出程序,也没有对异常的状态值做处理,所以直到走到这里才崩掉的。