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.
Other
4.38k stars 766 forks source link

X86GatherLayerAcc::Forward invalid slice_index #1877

Open MankaranSingh opened 1 year ago

MankaranSingh commented 1 year ago

1. 环境(environment)

On x86, gather layer in model causes some issue.

6. 运行日志(runtime log) x86:

E/tnn: DoForward [File source/tnn/device/x86/acc/x86_gather_layer_acc.cc][Line 69] X86GatherLayerAcc::Forward invalid slice_index
E/tnn: Forward [File source/tnn/core/default_network.cc][Line 615] Forward error code: 0x4000 msg: X86GatherLayerAcc::Forward invalid slice_index, exit

opencl:

E/tnn: Forward [File source/tnn/device/opencl/acc/opencl_layer_acc.cc][Line 137] code: 0xA001 msg: OpenCL NDRange failed
E/tnn: Forward [File source/tnn/core/default_network.cc][Line 615] Forward error code: 0xA001 msg: OpenCL NDRange failed, exit

Model files (tnnmodel and proto are in zip): https://drive.google.com/file/d/1up61AdaleDutXnSBaHXH_88J-zU9vchr/view?usp=sharing

MankaranSingh commented 1 year ago

It's related to gather layer having negative indices. TNN dosent supports negative indices for opencl/x86/arm I guess. NAIVE worls ok