IPrototypeLayer is an optional interface that marks a layer as a prototype layer.
More...
#include <nvneural/layers/IPrototypeLayer.h>
|
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.
|
|
IPrototypeLayer is an optional interface that marks a layer as a prototype layer.
Prototype layers carry layer inference code as part of the model definition; this interface allows network builders such as XmlNetworkBuilder to connect the layer to its implementation.
◆ addForwardEvalCall()
virtual NeuralResult nvneural::IPrototypeLayer::addForwardEvalCall |
( |
const char * |
pName, |
|
|
const char * |
pCall |
|
) |
| |
|
pure virtualnoexcept |
Adds a call script for a particular tensor format and backend.
Replaces previous definitions of that kernel.
- Parameters
-
pName | Name of the prototype (e.g., "cuda_fp32_nchw") |
pCall | Call script for the prototype |
◆ addParameterKey()
virtual NeuralResult nvneural::IPrototypeLayer::addParameterKey |
( |
const char * |
pKey | ) |
|
|
pure virtualnoexcept |
Adds a named parameter to the layer.
- Parameters
-
pKey | Parameter name that should be included in kernel calls |
◆ addPrototypeCode()
virtual NeuralResult nvneural::IPrototypeLayer::addPrototypeCode |
( |
const char * |
pName, |
|
|
const char * |
pCode |
|
) |
| |
|
pure virtualnoexcept |
Adds a kernel definition for a particular tensor format and backend.
Replaces previous definitions of that kernel.
- Parameters
-
pName | Name of the prototype provided (e.g., "cuda_fp32_nchw") |
pCode | Kernel code for the prototype |
◆ loadPrototypeInfo()
Loads prototype definitions from a parameter node.
This is not part of an XML <Parameters> declaration; see the definition of XmlNetworkBuilder for how parameters are packed into an IParameterNode for this call.
Network builders use loadPrototypeInfo; generated code will typically use the more fine-grained setPrototypeInfo and addThing functions.
- Parameters
-
pParameters | Attributes of the prototype layer |
◆ setPrototypeInfo()
Sets details of the prototype layer explicitly.
- Parameters
-
inputsCount | Number of inputs provided to the layer |
pType | Type string to report in ILayer::serializedType |
backend | Network backend ID to report in ILayer |
format | Tensor format to report in ILayer |
pDim | Dimension script string |
pImpl | Implementation type string |
The documentation for this class was generated from the following file: