Skip to content

Conversation

@umireon
Copy link
Collaborator

@umireon umireon commented Nov 10, 2025

This pull request adds support for the ONNX Runtime ROCM execution provider (for AMD GPUs) and improves detection and configuration of GPU acceleration options. It also removes the previous TensorRT (NVIDIA) support and updates both the codebase and user interface to reflect these changes. Additionally, documentation and localization files are updated to match the new GPU support options.

Users on linux who need GPU have to build our plugin from source, and this policy ensures that a correct GPU framework is present on their system.

Build system and GPU provider detection:

  • Updated CMakeLists.txt to detect ONNX Runtime CUDA and ROCM execution providers at build time, defining HAVE_ONNXRUNTIME_CUDA_EP and HAVE_ONNXRUNTIME_ROCM_EP accordingly. This enables conditional compilation of GPU support depending on available providers.
  • Removed the unconditional disabling of ONNX Runtime GPU support via DISABLE_ONNXRUNTIME_GPU in CMakeLists.txt.

Codebase and execution provider changes:

  • Removed all TensorRT-related code and constants, and replaced them with ROCM support in both filter property dialogs and ONNX session creation. Now, CUDA and ROCM providers are conditionally enabled based on build-time detection. [1] [2] [3] [4]

Documentation updates:

  • Updated the README.md to clarify GPU support: Windows will support WinML, Mac supports CoreML, and Linux supports CUDA and ROCM via ONNX Runtime. Removed outdated references to TensorRT.

Localization/UI updates:

Constants:

  • Changed the USEGPU_TENSORRT constant to USEGPU_ROCM in src/consts.h.

This commit introduces support for the ROCm execution provider in ONNX Runtime. It adds new UI options for selecting ROCm as the inference device, updates constants, and conditionally compiles ROCm-related code paths. CUDA and ROCm options are now only shown if the corresponding ONNX Runtime support is available.
Introduced the 'GPUROCM' key with appropriate translations in all supported locale .ini files to support ROCM inference device labeling in the UI.
Replaces HAVE_ONNXRUNTIME_CUDA and HAVE_ONNXRUNTIME_ROCM with HAVE_ONNXRUNTIME_CUDA_EP and HAVE_ONNXRUNTIME_ROCM_EP to match updated macro definitions. Ensures correct conditional compilation for CUDA and ROCm execution providers.
This commit removes all code, localization strings, and documentation references related to TensorRT support. The affected files include source code, constants, and multiple locale files, reflecting the discontinuation of TensorRT as an inference device option.
@umireon umireon self-assigned this Nov 10, 2025
@umireon umireon requested a review from royshil November 10, 2025 19:03
@umireon
Copy link
Collaborator Author

umireon commented Nov 10, 2025

@royshil please review

@umireon umireon added this to the 1.3.3 milestone Nov 10, 2025
Copy link
Owner

@royshil royshil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@umireon umireon merged commit a4910b3 into main Nov 10, 2025
8 checks passed
@umireon umireon deleted the umireon/arch-gpu branch November 10, 2025 23:28
sobalap pushed a commit to sobalap/obs-backgroundremoval that referenced this pull request Jan 7, 2026
* Update CMakeLists.txt

* Add ROCm support for ONNX Runtime GPU execution

This commit introduces support for the ROCm execution provider in ONNX Runtime. It adds new UI options for selecting ROCm as the inference device, updates constants, and conditionally compiles ROCm-related code paths. CUDA and ROCm options are now only shown if the corresponding ONNX Runtime support is available.

* Add GPU-ROCM translation to all locale files

Introduced the 'GPUROCM' key with appropriate translations in all supported locale .ini files to support ROCM inference device labeling in the UI.

* Update enhance-filter.cpp

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update ONNX Runtime GPU provider macro names

Replaces HAVE_ONNXRUNTIME_CUDA and HAVE_ONNXRUNTIME_ROCM with HAVE_ONNXRUNTIME_CUDA_EP and HAVE_ONNXRUNTIME_ROCM_EP to match updated macro definitions. Ensures correct conditional compilation for CUDA and ROCm execution providers.

* Remove TensorRT support and references

This commit removes all code, localization strings, and documentation references related to TensorRT support. The affected files include source code, constants, and multiple locale files, reflecting the discontinuation of TensorRT as an inference device option.
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.

3 participants