NVIDIA NvNeural SDK  2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
nvneural::IOnnxGenerationGraphAttribute Class Referenceabstract

Tool-provided interface representing an AttributeProto in an ONNX graph node. More...

#include <nvneural/OnnxTypes.h>

Inheritance diagram for nvneural::IOnnxGenerationGraphAttribute:
nvneural::IRefObject

Public Member Functions

virtual NeuralResult setDocString (const char *pDocString) noexcept=0
 Assigns a human-readable documentation string to the node. More...
 
virtual NeuralResult setName (const char *pName) noexcept=0
 Sets the name of this attribute.
 
Scalar assignment

Attributes can contain scalar values.

Use the assign* functions to set the value and the attribute type field in a single call. You may reassign the value of an attribute as many times as you wish, but may not change the type of the attribute once set by an assign* or push* call.

virtual NeuralResult assignFloat (float value) noexcept=0
 Assigns a scalar value of type FLOAT. More...
 
virtual NeuralResult assignInteger (std::int64_t value) noexcept=0
 Assigns a scalar value of type INT. More...
 
virtual NeuralResult assignString (const char *pBuffer) noexcept=0
 Assigns a scalar value of type STRING. More...
 
virtual NeuralResult assignBytes (const char *pBuffer, size_t bufferBytes) noexcept=0
 Assigns a scalar value of type STRING. More...
 
Vector assignment

Attributes can contain repeated values.

Each push* function appends a value to the end of the appropriate field of the AttributeProto. Note that a single call to a push* function yields a different AttributeProto.AttributeType from a single call to an assign* function. You may not change the type of the attribute once set by an assign* or push* call.

virtual NeuralResult pushFloat (float value) noexcept=0
 Appends to a vector of type FLOATS. More...
 
virtual NeuralResult pushInteger (int64_t value) noexcept=0
 Appends to a vector of type INTS. More...
 
virtual NeuralResult pushString (const char *pBuffer) noexcept=0
 Appends to a vector of type STRINGS. More...
 
virtual NeuralResult pushString (const char *pBuffer, size_t bufferBytes) noexcept=0
 Appends to a vector of type STRINGS. More...
 
- Public Member Functions inherited from nvneural::IRefObject
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 = 0x759f0395a35632cful
 Interface TypeId for InterfaceOf purposes.
 
- Static Public Attributes inherited from nvneural::IRefObject
static const TypeId typeID = 0x14ecc3f9de638e1dul
 Interface TypeId for InterfaceOf purposes.
 

Additional Inherited Members

- Public Types inherited from nvneural::IRefObject
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.
 
- Protected Member Functions inherited from nvneural::IRefObject
virtual ~IRefObject ()=default
 A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr.
 

Detailed Description

Tool-provided interface representing an AttributeProto in an ONNX graph node.

Member Function Documentation

◆ assignBytes()

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::assignBytes ( const char *  pBuffer,
size_t  bufferBytes 
)
pure virtualnoexcept

Assigns a scalar value of type STRING.

Parameters
pBufferString value to assign. The string may contain binary data.
bufferBytesNumber of bytes in the character array described by pBuffer.

◆ assignFloat()

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::assignFloat ( float  value)
pure virtualnoexcept

Assigns a scalar value of type FLOAT.

Parameters
valueValue to assign.

◆ assignInteger()

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::assignInteger ( std::int64_t  value)
pure virtualnoexcept

Assigns a scalar value of type INT.

Parameters
valueValue to assign.

◆ assignString()

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::assignString ( const char *  pBuffer)
pure virtualnoexcept

Assigns a scalar value of type STRING.

Parameters
pBufferString value to assign. The string must be null-terminated.

◆ pushFloat()

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::pushFloat ( float  value)
pure virtualnoexcept

Appends to a vector of type FLOATS.

Parameters
valueValue to append.

◆ pushInteger()

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::pushInteger ( int64_t  value)
pure virtualnoexcept

Appends to a vector of type INTS.

Parameters
valueValue to append.

◆ pushString() [1/2]

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::pushString ( const char *  pBuffer)
pure virtualnoexcept

Appends to a vector of type STRINGS.

Parameters
pBufferString value to append. The string must be null-terminated.

◆ pushString() [2/2]

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::pushString ( const char *  pBuffer,
size_t  bufferBytes 
)
pure virtualnoexcept

Appends to a vector of type STRINGS.

Parameters
pBufferString value to append. The string may contain binary data.
bufferBytesNumber of bytes in the character array described by pBuffer.

◆ setDocString()

virtual NeuralResult nvneural::IOnnxGenerationGraphAttribute::setDocString ( const char *  pDocString)
pure virtualnoexcept

Assigns a human-readable documentation string to the node.

This function is optional.

Parameters
pDocStringNew documentation string. Markdown is allowed.

The documentation for this class was generated from the following file: