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.41k stars 771 forks source link

编译Android demo报错 #1747

Open WCZ93762 opened 2 years ago

WCZ93762 commented 2 years ago

1. 环境(environment)

-- Generating done

4. 编译日志(build log)

 将日志粘贴在这里
 Paste log here or pastebin

在Android Studio中的错误: executing external native build for cmake /Users/zego/Desktop/code/TNN/examples/android/demo/CMakeLists.txt

CMake Error at ../../../CMakeLists.txt:336 (message): No Python installation found! It is required by OpenCL codegen.

在终端中的编译日志: -- The C compiler identification is AppleClang 13.0.0.13000027 -- The CXX compiler identification is AppleClang 13.0.0.13000027 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is Clang with GNU-like command-line -- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc /Users/zego/Desktop/code/TNN/examples/android/demo /Users/zego/Desktop/code/TNN -- >>>>>>>>>>>>> -- TNN BUILD INFO: -- System: Darwin -- Processor: arm64 -- Cpu: ON -- X86: OFF -- Arm: ON -- Arm82: OFF -- Metal: OFF -- OpenCL: ON -- CUDA: OFF -- DSP: OFF -- Atlas: OFF -- TensorRT: OFF -- AppleNPU: OFF -- HuaweiNPU: OFF -- RKNPU: OFF -- OpenVINO: OFF -- OpenMP: OFF -- TEST: OFF -- --Unit Test: OFF -- Quantization: OFF -- ModelCheck: OFF -- DEBUG: -- PROFILE: OFF -- BENCHMARK: OFF -- BENCHMARK Layer: OFF -- Model Converter: OFF -- ONNX2TNN Converter: OFF -- TNN2MEM: OFF -- BENCHMARK Test Lib: OFF -- Dynamic Range Quantization: OFF -- Found PythonInterp: /Users/zego/opt/anaconda3/bin/python (found version "3.9.12") Generate OpenCL Source done !!!

-- Looking for CL_VERSION_2_2 -- Looking for CL_VERSION_2_2 - not found -- Looking for CL_VERSION_2_1 -- Looking for CL_VERSION_2_1 - not found -- Looking for CL_VERSION_2_0 -- Looking for CL_VERSION_2_0 - not found -- Looking for CL_VERSION_1_2 -- Looking for CL_VERSION_1_2 - found -- Found OpenCL: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenCL.framework (found version "1.2") -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: log-lib linked by target "tnn_wrapper" in directory /Users/zego/Desktop/code/TNN/examples/android/demo

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.

5. 详细描述bug 情况 (Describe the bug)

6. 运行日志(runtime log)

 将日志粘贴在这里
 Paste log here or pastebin

7. 截图(Screenshots)

<img width="1143" alt="image" src="https://user-images.githubusercontent.com/22864724/182104605-8e68dc0d-b0c8-4d98-895c-0d07bb4f7f3e.png">
koala99 commented 2 years ago

set(TNN_OPENCL_ENABLE OFF CACHE BOOL "" FORCE) TNN_OPENCL_ENABLE off for android

WCZ93762 commented 2 years ago

你好,已收到,感谢

TheMelody commented 6 months ago

set(TNN_OPENCL_ENABLE OFF CACHE BOOL "" FORCE) TNN_OPENCL_ENABLE off for android

牛啊牛啊,正常运行了