Skip to content

OpenPose in OpenCL GPU mode is not working properly (AMD Graphics, Windows 10) #1879

@alvayus

Description

@alvayus

Hey! This is my first time using OpenPose for a project (i'm working on my master's thesis)

Issue Summary

After getting run cmake setup (which has been a long and hard way, until i realized that i had to download the OpenCL SDK in order to have the OpenCL headers) i tried to run my Python code, which is based on the code openpose/examples/tutorial_api_python/01_body_from_image.py and which try to import the pyopenpose library and use it to process all frames got from a camera.

All seem to be going well, but when my graphic card is detected, nothing else is shown by console for a long time. A couple of minutes later, i get an error on the console, which seems to be generated from compiling opencl source code (i'm not very familiar with OpenCL, but i was not expecting this in the Python code)

Note: I tested the program and it is working fine in CUDA GPU Mode, with Nvidia GeForce GTX 1060, and in CPU Only Mode.

Errors

Starting OpenPose Python Wrapper...
The default dynamic --net_resolution is not supported in MKL (MKL CPU Caffe) and OpenCL Caffe versions. Please, use a static net_resolution (recommended --net_resolution 656x368) or use the Caffe CUDA master branch when processing images and/or when using your custom image reader. OpenPose has automatically set the resolution to 656x368.
---------------------------------- WARNING ----------------------------------
We have introduced an additional boost in accuracy in the CUDA version of about 0.2% with respect to the CPU/OpenCL versions. We will not port this to CPU given the considerable slow down in speed it would add to it. Nevertheless, this accuracy boost is almost insignificant so the CPU/OpenCL versions can be safely used.
-------------------------------- END WARNING --------------------------------
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
--> Here the program blocks itself a couple of minutes <--
Kernel: resizeAndMergeFullKernel Type: float GPU: 0 built successfully
Kernel: resizeAndMergeKernel Type: float GPU: 0 built successfully
Kernel: resizeAndAddKernel Type: float GPU: 0 built successfully
Kernel: resizeAndAverageKernel Type: float GPU: 0 built successfully
Kernel: zeroBufferKernel Type: float GPU: 0 built successfully
Kernel: copyBufferKernel Type: float GPU: 0 built successfully
Kernel: nmsRegisterKernel Type: float GPU: 0 built successfully
Kernel: nmsFullRegisterKernel Type: float GPU: 0 built successfully
Kernel: nmsWriteKernel Type: float GPU: 0 built successfully
Kernel: partialSumKernel Type: float GPU: 0 built successfully
Kernel: nmsFullWriteKernel Type: float GPU: 0 built successfully
Device: gfx1010
C:\Users\alvco\AppData\Local\Temp\comgr-243be4\input\CompileSource:1:1751: error: expected expression
int intRoundGPU(const float a) { return (int)(a+0.5); } ... (watch the whole console output) ...
^
1 error generated.
Error: Failed to compile opencl source (from CL or HIP source to LLVM IR).`

Type of Issue

  • Execution error
  • Help wanted

Your System Configuration

  1. Whole console output: https://pastebin.com/MX6k8cEx

  2. OpenPose version: Latest GitHub code (OpenPose v1.7.0)

  3. General configuration:

    • Installation mode: CMake
    • Operating system: Windows
    • Operating system version: Windows 10
    • Release or Debug mode: Release
    • Compiler: Visual Studio 16 2019 (Community)
  4. Non-default settings:

    • 3-D Reconstruction module added: No
    • Any other custom CMake configuration with respect to the default version: No
  5. 3rd-party software:

    • Caffe version: Default from OpenPose
    • CMake version CMake 3.20.0-rc1
    • OpenCV version: OpenPose default. Using opencv-contrib-python 4.5.1.48 in my PyCharm project
  6. If GPU mode issue:

    • GPU model: AMD Radeon RX 5600 XT
  7. If Python API:

    • Python version: 3.7.9
    • Numpy version: 1.20.1
  8. If Windows system:

    • Compiled from source (CMake)

If you know how could i solve this issue, let me know please! Thanks a lot in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions