-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MacOS 10.13.6] compiled and ran predictions with OPENCL GPU_MODE #818
Comments
Hmm..interesting We were waiting for somebody with a radon graphics card with OSX to test it but no one came forward. We did not have such a machine. So does it actually work? What was the frame rate and what was the GPU utililization like? You can run it with the display on a longer video to see the frame rate. Starting will be slow because it has to compile the CL kernels |
This comment has been minimized.
This comment has been minimized.
@soulslicer I don't remember seeing the video while running it; I just waited for it to finish in the command line to output the .json. It did output the .json successfully, though. I'll run with a longer video later and benchmark the frame rate and GPU utilisation when I get home and report back the findings. |
@tmanh this is the step where you have to run the CMake GUI, right? I was having issues with that and cloned caffe directly into the |
@soulslicer I am so sorry! I just found out the command was using the non-AMD, Intel UHD Graphics 630 GPU. I incorrectly assumed it was the opposite, meaning I had to specify I would have to debug first why using
This may take some time |
My best guess of the error is that it should be using both the intel HD graphics and the AMD ones, and maybe OpenCL is not able to run in parallel in both of them simultaneously for being different brand GPUs. Could you try and let me know if it works with these extra 2 flags? And to recap, in your case, we know that: |
@gineshidalgo99 thanks for the quick reply! I'd like to clarify that in my case, this command worked:
and based on the GPU usage history, it only used the Intel HD Graphics 630 card, not the AMD one. However, when I try to use this command which specifies to use the AMD one:
it outputs the error in my previous comment. I tried the 2 flags you sent, but unfortunately, it still doesn't seem to work. Command used: Stacktrace:
I'm not too familiar with the libraries, but my guess is if some constant for the I can provide more info or even screencast if needed. |
Can you try an image that is a resolution that is a multiple of 64 or 128 (try a square image also) and also disable multithreading. Also Gines may be right, it may be trying to use both GPU's somehow |
Also, was OP any faster when using the Intel GPU (I would presume slower) |
@soulslicer sure! I tried the following: cropped 450x300 image: and ran the following command:
stacktrace was still similar:
square image (300x300): Command:
Stacktrace:
64/128 multiple image (256x256): Command:
Stacktrace:
|
I haven't done benchmark comparisons with using the CPU version and i9 processor, but after running predictions with the example |
Sorry you have to run --net_resolution 256x256. Please run this command instead of Openpose build/examples/tutorial_pose/1_extract_from_image.bin --image XX.jpg --net_resolution 256x256 |
That is the wrong command, you need to run build/examples/tutorial_pose/1_extract_from_image.bin --image XX.jpg --net_resolution 256x256 But I don't think it matters, it seems to be a weird bug on the Caffe side: I think it is a AMD OSX driver issue. We have tested the AMD RX Vega cards on Ubuntu and Windows with no problems. On the other hand, Apple has completely dropped OpenCL support from its systems so. |
It's still the same (I used --image_path, Command:
Stacktrace:
|
I see. At least we were able to document this. Thanks for all your help! @soulslicer @gineshidalgo99 |
It seems specific to OSX Unfortunately, it looks like AMD wont be working in OSX anytime soon |
That's unfortunate. It's all good, though; the |
Okay, but can you tell me your benchmarks when using the Intel GPU? Is it faster than the CPU version? |
@soulslicer when using Intel GPU, it's more or less the same with FPS and running time took ~1 min faster than when running i9 CPU with the following: ConstantsSample video
Flags
UsageMacBook was not used while running predictions Opened applicationsPyCharm Intel HD Graphics 630 GPU (built with
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Posting rules
Compile error
).Issues/comments which do not follow these rules will be ignored or removed with no further clarification.
Issue Summary
Compiled and ran predictions on AMD GPU version in MacOS 10.13.6 successfully (with minor mutex lock error at the end; but output is still successfully written)
You can use a GPU version in MacOS with the following steps:
viennacl
usingbrew install viennacl
OPENCL
GPU_MODEopenpose.bin
, make sure to run with--num_gpu_start 1
to avoidError: ViennaCL: FATAL ERROR: CL_INVALID_WORK_GROUP_SIZE
Used this command (also works for images):
Executed Command (if any)
./build/examples/openpose/openpose.bin --video examples/media/video.mp4 --num_gpu_start 1
(video.mp4 is my own 2-second video)
OpenPose Output (if any)
Type of Issue
Your System Configuration
OpenPose version: Latest GitHub code (v1.4.0)
General configuration:
OPENCL
GPU_MODE
)Non-default settings:
GPU_MODE=OPENCL
3rd-party software:
If GPU mode issue:
Radeon Pro 560X
causesINVALID_WORK_GROUP_SIZE
error in ViennaCL)If CPU-only mode issue:
If Python API:
If Windows system:
If speed performance issue:
Not sure if this should be a GitHub issue, but posting it here to share.
The text was updated successfully, but these errors were encountered: