[Feature Request][RFC]: Non-Intel GPU support in the OpenVINO GPU plugin
Request Description
Summary
This RFC proposes enabling support for non-Intel GPUs, specifically NVIDIA and AMD GPUs, in the OpenVINO GPU plugin.
We previously discussed this proposal with OpenVINO developers and aligned on the general direction of adding NVIDIA GPU support through SYCL. This RFC describes the proposed technical changes and asks for input on the remaining CI infrastructure question.
Motivation
The OpenVINO GPU plugin currently supports Intel GPUs through OpenCL and Level Zero.
An NVIDIA GPU plugin already exists in openvino_contrib, but it is developed and distributed separately from the GPU plugin in the main OpenVINO repository. There is currently no equivalent AMD GPU plugin.
SYCL runtime support has recently been introduced into the OpenVINO GPU plugin, providing a foundation for targeting GPUs from different vendors.
We propose adding build-time options to enable NVIDIA and AMD GPUs in the OpenVINO GPU plugin. Intel GPUs remain the default, and no behavior change is intended for existing Intel GPU builds.
Proposal
We would like to discuss the technical details of extending SYCL support to NVIDIA and AMD GPUs. NVIDIA GPUs will be supported first, followed by AMD GPUs in a later phase.
The proposed foundational changes (especially for supporting NVIDIA GPUs) are as follows:
- Add build-time options:
GPU_VENDOR=INTEL | NVIDIA | AMD, defaulting toINTEL- Specifies the GPU vendor to build for. This determines the SYCL target triple and
DNNL_GPU_VENDORfor the oneDNN build.
- Specifies the GPU vendor to build for. This determines the SYCL target triple and
GPU_TARGET_ARCH, for examplesm_80orgfx90a- Specifies the GPU target architecture for NVIDIA or AMD GPUs.
- Relevant files:
src/plugins/intel_gpu/CMakeLists.txtsrc/plugins/intel_gpu/thirdparty/CMakeLists.txt
- Define a build-time vendor macro and guard vendor-specific functionality
- Enable nGEN hardware detection and oneDNN microkernel paths only for Intel GPUs
src/plugins/intel_gpu/src/graph/impls/ocl/kernels_cache.cppsrc/plugins/intel_gpu/src/graph/impls/ocl_v2/moe/moe_3gemm_gen_micro.[ch]ppsrc/plugins/intel_gpu/src/graph/impls/ocl_v2/moe/moe_3gemm_swiglu_opt.cppsrc/plugins/intel_gpu/src/kernel_selector/micro_utils.hppsrc/plugins/intel_gpu/src/runtime/sycl/sycl_device.cpp- etc.
- Add vendor-specific conditions to oneDNN primitives'
validate_impl(e.g., the cuBLAS backend for the oneDNN fully connected primitive does not support compressed weights)src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.hppsrc/plugins/intel_gpu/src/graph/impls/onednn/gemm_onednn.hppsrc/plugins/intel_gpu/src/graph/impls/onednn/convolution_onednn.hpp- etc.
- Enable nGEN hardware detection and oneDNN microkernel paths only for Intel GPUs
- Use oneDNN as the primary path, and use OpenCL kernels when oneDNN does not support an operation.
- Use optimized libraries (cuDNN and cuBLAS) through oneDNN
- Compile OpenCL kernels and run them through the SYCL runtime
src/plugins/intel_gpu/src/runtime/sycl/nvidia/*
- Add CI for NVIDIA builds and tests.
Questions
CI types and runner infrastructure
The technical direction of NVIDIA GPU support has already been discussed with OpenVINO developers. The CI infrastructure for NVIDIA GPU testing, however, remains an open question.
| Test type | Runner |
|---|---|
| Build | GitHub-hosted CPU runner |
| Runtime tests | GitHub-hosted runner with an NVIDIA GPU |
Build verification can run on a CPU-only runner, but runtime testing requires an NVIDIA GPU. GitHub-hosted runners with NVIDIA GPUs are available, but they are more expensive. Would it be possible for the OpenVINO project to provide and host such a runner, and cover its cost? The execution frequency could be adjusted according to available capacity and budget - for example, by running the check only on relevant pull requests, or on demand.
Note also that the purpose of this CI is to detect regressions in NVIDIA GPU support. Since this support is experimental, we do not think the NVIDIA runtime CI check needs to be a required check for merging pull requests.
Feature Use Case
Users who run NVIDIA or AMD GPUs would be able to use OpenVINO for GPU inference on their hardware, which the GPU plugin does not currently support. This makes OpenVINO usable in more environments and broadens its user base.
Issue submission checklist
- The feature request or improvement must be related to OpenVINO
Source: openvinotoolkit/openvino