NVIDIA NvNeural SDK
2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
|
IConcatenationLayer2 is an optional interface implemented by layers that marks them as concatenation layers. More...
#include <nvneural/LayerTypes.h>
Public Member Functions | |
virtual bool | allInputsSupportDirectTensorWrites () const noexcept=0 |
Tests whether all inputs to this layer can be replaced with direct writes. More... | |
virtual NeuralResult | getTensorWriteOffset (const ILayer *pInput, std::size_t *pOffsetOut) const noexcept=0 |
Retrieves the write offset for the specified layer if possible. More... | |
![]() | |
virtual bool | inputSupportsElision (size_t inputIndex, std::size_t *pElisionOffsetOut) const noexcept=0 |
If this layer supports elision, it calculates the appropriate offset for a given input. 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 = 0x715eaa65a023d7bcul |
Interface TypeId for InterfaceOf purposes. | |
![]() | |
static const IRefObject::TypeId | typeID = 0xe4924aa3178a6e9ful |
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. | |
IConcatenationLayer2 is an optional interface implemented by layers that marks them as concatenation layers.
This is a revised version of IConcatenationLayer that requires more checks for direct writes.
Null inputs always support direct writes, though sparse inputs are generally not recommended for concatenation. Layers cannot insert padding between inputs; relative execution order of layer inputs is not guaranteed. Layers cannot write into more than one location; concatenating a layer with itself is not supported. Layers must match the output format of the concatenation layer. Layers cannot be marked as permanent.
Output offsets must remain valid until the concatenation layer is reshaped.
|
pure virtualnoexcept |
Tests whether all inputs to this layer can be replaced with direct writes.
|
pure virtualnoexcept |
Retrieves the write offset for the specified layer if possible.
If the provided layer is not an input of this layer, or concatenation of the provided layer cannot be performed by allocating a linear span of this layer's output tensor memory as the provided layer's own output, then this function returns a failure result and sets the output offset to zero.
If the layer does support direct tensor writes, returns success and sets the output offset.
pInput | Layer that is an input to this concatenation layer |
pOffsetOut | Variable receiving an offset to this layer's tensor memory |