Commit graph

9 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
cd8abac142 nvidia/cuda: Adjust to match coding guidelines 2023-04-05 18:51:05 +02:00
Michael Fabian 'Xaymar' Dirks
5adebc5f03 project: Apply formatting 2023-04-05 18:50:51 +02:00
Michael Fabian 'Xaymar' Dirks
c0a108bf4a nvidia/cuda/stream: Add synchronize function 2023-04-05 18:50:51 +02:00
Michael Fabian 'Xaymar' Dirks
7b38114469 nvidia/cuda: Log extra information when built for Debug 2023-04-05 18:50:50 +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
63a5873413 project: Remove non-standard std:: prefix from types 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks
9658c1ee0f nvidia/cuda: Remove 'cu_' prefix from types 2023-03-28 12:52:11 +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
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