Skip to content
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

ROCm support #545

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

ROCm support #545

wants to merge 9 commits into from

Conversation

umireon
Copy link
Member

@umireon umireon commented Feb 9, 2024

I've added the documentation for ROCm-supported build.

@payom
Copy link

payom commented Feb 10, 2024

Can't comment on the build instructions as I don't operate in an Ubuntu environment. However, with the new changes, the plugin builds successfully on my machine. Upon installation, OBS loads the plugin and evidently is making use of the GPU when selecting "GPU - TensorRT" in the settings (which I would recommend to change to avoid confusion).

With the SINet, Mediapipe and PPHumanSeg models, the plugins runs perfectly in my environment. - I can't discern any difference when switching between running over the CPU or the GPU. Unfortunately, the remaining segmentation models don't work. When using the Selfie Segmentation model, I get garbage, and my OBS application outright crashes when selecting either Robust Video Matting or TCMonoDepth due to a "memory access fault" in the HIP backend.

My environment:

  • GPU: Radeon RX 6800 XT
  • ROCm version 6.0.2
  • ONNX Runtime 1.16.3
  • OBS Studio 30.0.2

@umireon
Copy link
Member Author

umireon commented Feb 10, 2024

@payom Thank you for your feedback! It would be so helpful for us if you posted the whole part of the OBS log when OBS crashed. You can get OBS logs and crash reports from the OBS help menu.

@payom
Copy link

payom commented Feb 10, 2024

Here's the log while running OBS with verbose logging enabled

Unfortunately, the crash doesn't appear to have been captured in the log.

Setting the MIOPEN_ENABLE_LOGGING_CMD flag and running OBS from my terminal, I also get this print out which is what I used to identify what crashed in my earlier message

libDeckLinkAPI.so: cannot open shared object file: No such file or directory
MIOpen(HIP): Command [Pooling_logging_cmd] ./bin/MIOpenDriver pool -M 0 --input 1x3x192x192,110592x36864x192x1 -y 2 -x 2 -p 0 -q 0 -v 2 -u 2 -m avg -F 1 -t 1
MIOpen(HIP): Command [Pooling_logging_cmd] ./bin/MIOpenDriver pool -M 0 --input 1x3x96x96,27648x9216x96x1 -y 2 -x 2 -p 0 -q 0 -v 2 -u 2 -m avg -F 1 -t 1
MIOpen(HIP): Command [Pooling_logging_cmd] ./bin/MIOpenDriver pool -M 0 --input 1x3x48x48,6912x2304x48x1 -y 2 -x 2 -p 0 -q 0 -v 2 -u 2 -m avg -F 1 -t 1
MIOpen(HIP): Command [LogCmdFindConvolution] ./bin/MIOpenDriver conv -n 1 -c 3 -H 192 -W 192 -k 16 -y 3 -x 3 -p 1 -q 1 -u 2 -v 2 -l 1 -j 1 -m conv -g 1 -F 1 -t 1
MIOpen(HIP): Command [LogCmdConvolution] ./bin/MIOpenDriver conv -n 1 -c 3 -H 192 -W 192 -k 16 -y 3 -x 3 -p 1 -q 1 -u 2 -v 2 -l 1 -j 1 -m conv -g 1 -F 1 -t 1
MIOpen(HIP): Command [LogCmdFindConvolution] ./bin/MIOpenDriver conv -n 1 -c 16 -H 96 -W 96 -k 16 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 16 -F 1 -t 1
MIOpen(HIP): Command [LogCmdFusion] ./bin/MIOpenDriver CBAInfer -F 4 -n 1 -c 16 -H 96 -W 96 -k 16 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -g 16 -S 0
Memory access fault by GPU node-1 (Agent handle: 0x5bad78b80150) on address 0x7f69b5200000. Reason: Page not present or supervisor privilege.

@umireon
Copy link
Member Author

umireon commented Feb 10, 2024

@royshil How should we implement ROCm support?

@royshil
Copy link
Collaborator

royshil commented Feb 10, 2024

i think we need to research ROCm execution provider outside of the plugin to see why it behaves in this way with these particular models, and not with others.
Unfortunately i can't do it on my machines, since i don't have AMD GPUs.

the other option would be to switch away from ONNX Runtime to a different neural net framework that has more seemless support for the various accelerator vendors like Nvidia, AMD, Intel, DirectX etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants