Commit Graph

12 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks dcd4f7f9f0 nvidia/cuda: Apply coding guidelines 2023-04-05 18:50:59 +02:00
Michael Fabian 'Xaymar' Dirks d62da72ce5 util: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks 47ef5dd995 nvidia/cuda: Add function to query version directly 2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks f316e0aa70 nvidia/cuda: Update to match CUDA 11.1 and later
Adds several new functions that may be required for operation
2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks 70f54b312b nvidia/cuda: Print the Driver CUDA version to the log 2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks 98f711523e nvidia/cuda: Use util::library and remove CUDA library argument
The CUDA library is always available as a singleton, so it does not make sense for it to be passed in. Instead we can simply grab it from the singleton and use it as it is, which makes the code easier to maintain and automates certain code.
2023-04-05 18:50:50 +02:00
Michael Fabian 'Xaymar' Dirks b0ac0b724a nvidia/cuda: Use reinterpret_case instead of static_cast 2023-03-28 13:11:12 +02:00
Michael Fabian 'Xaymar' Dirks 5530d2d416 nvidia/cuda/cuda: Convert to global Singleton 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks a40db1258a nvidia/cuda: Add cuCtxCreate, cuCtxSynchronize 2023-03-28 12:40:43 +02:00
Michael Fabian 'Xaymar' Dirks 4d8ff417e7 nvidia-cuda: Improve usage of CUDA resources and functions
Load additional functions from CUDA and add new enumerations to support them:
* cuDevicePrimaryCtxSetFlags allows us to sched scheduling mode for the GPU.
* cuCtxgetStreamPriorityRange allows us to check which priority levels are supported.
* cuStreamCreateWithPriority allows us to create streams with non-default priority.

The scheduler mode is now set to yield so that other threads can do work when we hit an eventual stalling problem. Streams can also now be created with higher priority and different flags, if necessary. In most cases this should allow CUDA resources to execute even while the GPU is under heavy load.
2020-04-17 11:44:37 +02:00
Michael Fabian 'Xaymar' Dirks a138f95126 cmake: Fix clang support in native OBS Studio build 2020-04-05 06:50:21 +02:00
Michael Fabian 'Xaymar' Dirks 88213e81f6 nvidia-cuda: GPL compatible CUDA library interface
Due to the 'nvcuda' library being part of the driver, it falls in a clause of the GPL which allows us to load and interface with system drivers. Since we can't rely on Nvidias headers here (incompatible license), most of this was pulled from FFmpeg and other things were found out via testing.
2020-03-31 21:46:47 +02:00