Skip to content

Rocm Linux GPU support #616

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

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

Conversation

directrix1
Copy link

Enables AMD GPU acceleration via ROCm on Linux.

@royshil royshil self-requested a review April 1, 2025 19:55
@danir-de
Copy link

danir-de commented Apr 27, 2025

Currently throws countless identical errors in the console when selecting ROCm, with 20GB free GPU memory and 50GB free RAM on a 1440p canvas on OBS 31.0.3 with nnxruntime-opt-rocm 1.20.2-8:

error: [obs-backgroundremoval] ONNXRuntime Exception: Non-zero status code returned while running Conv node. Name:'Conv_8' Status Message: /usr/src/debug/onnxruntime/onnxruntime-opt-rocm/onnxruntime/core/framework/bfc_arena.cc:376 void* onnxruntime::BFCArena::AllocateRawInternal(size_t, bool, onnxruntime::Stream*, bool, onnxruntime::WaitNotificationFn) Failed to allocate memory for requested buffer of size 136682165858560
Stacktrace:
/usr/lib/libonnxruntime.so.1(+0x9059fb) [0x7c53fe9059fb]
/usr/lib/libonnxruntime.so.1(+0x8f00f6) [0x7c53fe8f00f6]
/usr/lib/libonnxruntime.so.1(+0x2cc4ab) [0x7c53fe2cc4ab]
/usr/lib/libonnxruntime_providers_rocm.so(+0x1571d2) [0x7c51e2b571d2]
/usr/lib/libonnxruntime_providers_rocm.so(+0xf09ee) [0x7c51e2af09ee]
/usr/lib/libonnxruntime_providers_rocm.so(+0xf0c0b) [0x7c51e2af0c0b]
/usr/lib/libonnxruntime_providers_rocm.so(+0xf1862) [0x7c51e2af1862]
/usr/lib/libonnxruntime_providers_rocm.so(+0xcedd3) [0x7c51e2acedd3]
/usr/lib/libonnxruntime.so.1(+0x994d08) [0x7c53fe994d08]
/usr/lib/libonnxruntime.so.1(+0x996560) [0x7c53fe996560]
/usr/lib/libonnxruntime.so.1(+0x99677d) [0x7c53fe99677d]
/usr/lib/libonnxruntime.so.1(+0x998065) [0x7c53fe998065]
/usr/lib/libonnxruntime.so.1(+0x973e4f) [0x7c53fe973e4f]
/usr/lib/libonnxruntime.so.1(+0x358657) [0x7c53fe358657]
/usr/lib/libonnxruntime.so.1(+0x359bd6) [0x7c53fe359bd6]
/usr/lib/libonnxruntime.so.1(+0x2a6197) [0x7c53fe2a6197]
/usr/lib/obs-plugins/obs-backgroundremoval.so(+0xef62) [0x7c540494ff62]
/usr/lib/obs-plugins/obs-backgroundremoval.so(+0x15678) [0x7c5404956678]
/usr/lib/libobs.so.30(+0x70106) [0x7c5499d6a106]
/usr/lib/libobs.so.30(+0x85d10) [0x7c5499d7fd10]
/usr/lib/libc.so.6(+0x95708) [0x7c54972a3708]
/usr/lib/libc.so.6(+0x119aac) [0x7c5497327aac]

2025-04-27 16:17:57.287975244 [E:onnxruntime:, sequential_executor.cc:516 ExecuteKernel] Non-zero status code returned while running Conv node. Name:'Conv_8' Status Message: /usr/src/debug/onnxruntime/onnxruntime-opt-rocm/onnxruntime/core/framework/bfc_arena.cc:376 void* onnxruntime::BFCArena::AllocateRawInternal(size_t, bool, onnxruntime::Stream*, bool, onnxruntime::WaitNotificationFn) Failed to allocate memory for requested buffer of size 136682165858560
Stacktrace:
/usr/lib/libonnxruntime.so.1(+0x9059fb) [0x7c53fe9059fb]
/usr/lib/libonnxruntime.so.1(+0x8f00f6) [0x7c53fe8f00f6]
/usr/lib/libonnxruntime.so.1(+0x2cc4ab) [0x7c53fe2cc4ab]
/usr/lib/libonnxruntime_providers_rocm.so(+0x1571d2) [0x7c51e2b571d2]
/usr/lib/libonnxruntime_providers_rocm.so(+0xf09ee) [0x7c51e2af09ee]
/usr/lib/libonnxruntime_providers_rocm.so(+0xf0c0b) [0x7c51e2af0c0b]
/usr/lib/libonnxruntime_providers_rocm.so(+0xf1862) [0x7c51e2af1862]
/usr/lib/libonnxruntime_providers_rocm.so(+0xcedd3) [0x7c51e2acedd3]
/usr/lib/libonnxruntime.so.1(+0x994d08) [0x7c53fe994d08]
/usr/lib/libonnxruntime.so.1(+0x996560) [0x7c53fe996560]
/usr/lib/libonnxruntime.so.1(+0x99677d) [0x7c53fe99677d]
/usr/lib/libonnxruntime.so.1(+0x998065) [0x7c53fe998065]
/usr/lib/libonnxruntime.so.1(+0x973e4f) [0x7c53fe973e4f]
/usr/lib/libonnxruntime.so.1(+0x358657) [0x7c53fe358657]
/usr/lib/libonnxruntime.so.1(+0x359bd6) [0x7c53fe359bd6]
/usr/lib/libonnxruntime.so.1(+0x2a6197) [0x7c53fe2a6197]
/usr/lib/obs-plugins/obs-backgroundremoval.so(+0xef62) [0x7c540494ff62]
/usr/lib/obs-plugins/obs-backgroundremoval.so(+0x15678) [0x7c5404956678]
/usr/lib/libobs.so.30(+0x70106) [0x7c5499d6a106]
/usr/lib/libobs.so.30(+0x85d10) [0x7c5499d7fd10]
/usr/lib/libc.so.6(+0x95708) [0x7c54972a3708]
/usr/lib/libc.so.6(+0x119aac) [0x7c5497327aac]

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.

2 participants