DefTruth / lite.ai.toolkit

🛠 A lite C++ toolkit of awesome AI models, support ONNXRuntime, MNN. Contains YOLOv5, YOLOv6, YOLOX, YOLOv8, FaceDet, HeadSeg, HeadPose, Matting etc. Engine: ONNXRuntime, MNN.
https://github.com/DefTruth/lite.ai.toolkit
GNU General Public License v3.0
3.53k stars 672 forks source link

Can not use OpenCL on Macos #376

Closed MachineLP closed 1 year ago

MachineLP commented 1 year ago

TNN Version : network_device_type = tnn::DEVICE_OPENCL

  1. 环境(environment)

Build OS and Version: Mac RunTime OS Version: MacOS RunTime DEVICE: OPENCL

  1. Github版本 v0.3.0

  2. 运行日志(runtime log)

    load func (clCreateFromEGLImageKHR) from (/System/Library/Frameworks/OpenCL.framework/OpenCL) failed!'
    I/tnn: 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: LoadLibraryFromPath [File source/tnn/device/opencl/opencl_wrapper.cc][Line 244] load func (clCreateFromEGLImageKHR) from (/System/Library/Frameworks/OpenCL.framework/OpenCL) failed!
    E/tnn: Init [File source/tnn/device/opencl/opencl_context.cc][Line 277] OpenCL Runtime Init() failed (ret = 36865)!
    libc++abi: terminating with uncaught exception of type std::out_of_range: map::at:  key not found
    zsh: abort      ./test_webcam
MachineLP commented 1 year ago
 1