NVIDIA NvNeural SDK
2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
|
INetworkBackend companion interface with CUDA-specific functionality. More...
#include <nvneural/CudaTypes.h>
Public Member Functions | |
virtual ICudaMemoryAllocator * | getAllocator () const noexcept=0 |
Returns the CUDA memory allocator interface. | |
virtual CUcontext | getCudaContext () const noexcept=0 |
Retrieves the active CUDA context. | |
virtual CUdevice | getCudaDevice () const noexcept=0 |
Retrieves the active CUDA device. | |
virtual CUstream | getCudaStream () const noexcept=0 |
Retrieves the active CUDA stream. More... | |
virtual ICudaRuntimeCompiler * | runtimeCompiler () const noexcept=0 |
Retrieves a runtime CUDA compiler. | |
virtual NeuralResult | setAllocator (ICudaMemoryAllocator *pAllocator) noexcept=0 |
Sets a new CUDA allocator instead of the default. More... | |
![]() | |
virtual RefCount | addRef () const noexcept=0 |
Increments the object's reference count. More... | |
virtual const void * | queryInterface (TypeId interface) const noexcept=0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
virtual void * | queryInterface (TypeId interface) noexcept=0 |
Retrieves a new object interface pointer. More... | |
virtual RefCount | release () const noexcept=0 |
Decrements the object's reference count and destroy the object if the reference count reaches zero. More... | |
Static Public Attributes | |
static const IRefObject::TypeId | typeID = 0x61f19c57a3032f9ul |
Interface TypeId for interfaceOf purposes. | |
![]() | |
static const TypeId | typeID = 0x14ecc3f9de638e1dul |
Interface TypeId for InterfaceOf purposes. | |
Additional Inherited Members | |
![]() | |
using | RefCount = std::uint32_t |
Typedef used to track the number of active references to an object. | |
using | TypeId = std::uint64_t |
Every interface must define a unique TypeId. This should be randomized. | |
![]() | |
virtual | ~IRefObject ()=default |
A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr. | |
INetworkBackend companion interface with CUDA-specific functionality.
The CudaBackend class (createable with ClassRegistry and the NVNEURAL_INETWORKBACKENDCUDA_OBJECTCLASS object class) provides INetworkBackend for common operations and INetworkBackendCuda for things that require CUDA-specific details.
By convention this interface uses CUDA driver API types (cuThing) rather than runtime API types (cudaThing), but most of these types are trivially convertible between the two. See the CUDA documentation for details.
|
pure virtualnoexcept |
Retrieves the active CUDA stream.
Reminder: CUstream and cudaStream_t are equivalent types. CUDA runtime code can just cast the CUstream accordingly.
|
pure virtualnoexcept |
Sets a new CUDA allocator instead of the default.