|
NVIDIA NvNeural SDK
2021.1
GPU inference framework for NVIDIA Nsight Deep Learning Designer
|
Standard IWeightsData implementation containing a vector of values in CPU memory. More...
#include <WeightsData.h>
Public Member Functions | |
| NetworkBackendId | backendId () const noexcept |
| Returns the backend for which this weights data is relevant. More... | |
| const void * | data () const noexcept |
| Returns a pointer to the first element of the weights buffer. More... | |
| TensorDimension | dimension () const noexcept |
| Returns the size of the weights buffer in elements. More... | |
| bool | memManagedExternally () const noexcept |
| Returns true if the memory is managed outside NvNeural and should not be freed or reallocated by the framework. More... | |
| TensorFormat | tensorFormat () const noexcept |
| Returns the tensor format for the weights buffer. More... | |
| WeightsData (TensorFormat format, TensorDimension dimension, std::vector< TVectorData > &&container) | |
| Creates a new WeightsData object. More... | |
Public Member Functions inherited from nvneural::refobj::RefObjectBase< refobj::Implements< IWeightsData > > | |
| IRefObject::RefCount | addRef () const noexcept |
| Increment the object's reference count. More... | |
| const void * | queryInterface (IRefObject::TypeId interfaceId) const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void * | queryInterface (IRefObject::TypeId interfaceId) noexcept |
| Retrieves a new object interface pointer. More... | |
| RefObjectBase () | |
| Default constructor. Logs object creation. | |
| IRefObject::RefCount | release () const noexcept |
| Decrements the object's reference count and destroys the object if the reference count reaches zero. More... | |
Standard IWeightsData implementation containing a vector of values in CPU memory.
Typical weights loader implementations will move the data vector into this object.
| TVectorData | Element type contained in the vector |
| WeightsData::WeightsData | ( | TensorFormat | format, |
| TensorDimension | dimension, | ||
| std::vector< TVectorData > && | container | ||
| ) |
Creates a new WeightsData object.
| format | Tensor format (data type and layout); type is not inferred from the container parameter |
| dimension | Tensor dimension of the weights data |
| container | Rvalue reference to vector storage containing the entire weights tensor |
|
noexcept |
Returns the backend for which this weights data is relevant.
|
noexcept |
Returns a pointer to the first element of the weights buffer.
The address space for this pointer depends on the backend:
|
noexcept |
Returns the size of the weights buffer in elements.
|
noexcept |
Returns true if the memory is managed outside NvNeural and should not be freed or reallocated by the framework.
|
noexcept |
Returns the tensor format for the weights buffer.