TNN icon indicating copy to clipboard operation
TNN copied to clipboard

安卓benchmark kernel耗时显著小于总体平均耗时的原因是啥

Open YoungYoung619 opened this issue 2 years ago • 4 comments

1. 环境(environment)

  • Build OS and Version: Mac
  • RunTime OS Version:Android
  • RunTime DEVICE:OPENCL

2. Github版本

  • branch:master
  • commit(optional): c218bd0

3. 编译方式(compile method) build_android.sh benchmark_models.sh

4. 问题描述 shufflenet_v2 benchmark profile, opencl下的kernel runtime是1.958ms,但是总体平均耗时是76.121ms,中间多了差不多74ms,可能消耗在哪 image

5. 平台信息 image

opencl_runtime log: I/tnn: tnn::Status tnn::OpenCLRuntime::Init() [File /Users/lvanyang/Lib/cpp/TNN/source/tnn/device/opencl/opencl_runtime.cc][Line 120] OpenCL version: CL_TARGET_OPENCL_VERSION 200 CL_HPP_TARGET_OPENCL_VERSION 110 CL_HPP_MINIMUM_OPENCL_VERSION 110 I/tnn: tnn::Status tnn::OpenCLRuntime::Init() [File /Users/lvanyang/Lib/cpp/TNN/source/tnn/device/opencl/opencl_runtime.cc][Line 133] device name: QUALCOMM Adreno(TM) I/tnn: tnn::Status tnn::OpenCLRuntime::Init() [File /Users/lvanyang/Lib/cpp/TNN/source/tnn/device/opencl/opencl_runtime.cc][Line 134] opencl version: OpenCL 2.0 Adreno(TM) 640 I/tnn: tnn::Status tnn::OpenCLRuntime::Init() [File /Users/lvanyang/Lib/cpp/TNN/source/tnn/device/opencl/opencl_runtime.cc][Line 135] highest opencl c version: OpenCL C 2.0 Adreno(TM) 640 I/tnn: tnn::Status tnn::OpenCLRuntime::Init() [File /Users/lvanyang/Lib/cpp/TNN/source/tnn/device/opencl/opencl_runtime.cc][Line 157] Create common opencl context

YoungYoung619 avatar Jun 21 '22 06:06 YoungYoung619

image queue的时间点似乎被限制住了,是硬件的问题还是啥

YoungYoung619 avatar Jun 21 '22 11:06 YoungYoung619

方便提供一下具体的机型信息吗,我这边用小米9暂时没有复现这个问题

1627180283 avatar Jun 22 '22 09:06 1627180283

方便提供一下具体的机型信息吗,我这边用小米9暂时没有复现这个问题

我这个是车机,有空可以企微交流一下,lvanyang

YoungYoung619 avatar Jun 22 '22 09:06 YoungYoung619

和 lvan 沟通讨论了一下,这个问题只在特定车机上会出现,等 lvan 咨询车机厂商后看看

1627180283 avatar Jun 24 '22 09:06 1627180283

和 lvan 沟通了一下,issue 先关闭了,后续有需要可以再打开

1627180283 avatar Oct 12 '22 02:10 1627180283