NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
NvSciBuf Enumerations for Attribute Keys

Detailed Description

List of all NvSciBuf enumerations for attribute keys.

Enumerations

enum  NvSciBufAttrKey {
  NvSciBufAttrKey_LowerBound = NV_SCI_BUF_GENERAL_ATTR_KEY_START,
  NvSciBufGeneralAttrKey_Types,
  NvSciBufGeneralAttrKey_NeedCpuAccess,
  NvSciBufGeneralAttrKey_RequiredPerm,
  NvSciBufGeneralAttrKey_EnableCpuCache,
  NvSciBufGeneralAttrKey_GpuId,
  NvSciBufGeneralAttrKey_CpuNeedSwCacheCoherency,
  NvSciBufGeneralAttrKey_ActualPerm,
  NvSciBufGeneralAttrKey_VidMem_GpuId,
  NvSciBufRawBufferAttrKey_Size = NV_SCI_BUF_RAW_BUF_ATTR_KEY_START,
  NvSciBufRawBufferAttrKey_Align,
  NvSciBufImageAttrKey_Layout = NV_SCI_BUF_IMAGE_ATTR_KEY_START,
  NvSciBufImageAttrKey_TopPadding,
  NvSciBufImageAttrKey_BottomPadding,
  NvSciBufImageAttrKey_LeftPadding,
  NvSciBufImageAttrKey_RightPadding,
  NvSciBufImageAttrKey_VprFlag,
  NvSciBufImageAttrKey_Size,
  NvSciBufImageAttrKey_Alignment,
  NvSciBufImageAttrKey_PlaneCount,
  NvSciBufImageAttrKey_PlaneColorFormat,
  NvSciBufImageAttrKey_PlaneColorStd,
  NvSciBufImageAttrKey_PlaneBaseAddrAlign,
  NvSciBufImageAttrKey_PlaneWidth,
  NvSciBufImageAttrKey_PlaneHeight,
  NvSciBufImageAttrKey_PlaneScanType = 0x2000e,
  NvSciBufImageAttrKey_ScanType = NvSciBufImageAttrKey_PlaneScanType,
  NvSciBufImageAttrKey_PlaneBitsPerPixel,
  NvSciBufImageAttrKey_PlaneOffset,
  NvSciBufImageAttrKey_PlaneDatatype,
  NvSciBufImageAttrKey_PlaneChannelCount,
  NvSciBufImageAttrKey_PlaneSecondFieldOffset,
  NvSciBufImageAttrKey_PlanePitch,
  NvSciBufImageAttrKey_PlaneAlignedHeight,
  NvSciBufImageAttrKey_PlaneAlignedSize,
  NvSciBufImageAttrKey_ImageCount,
  NvSciBufTensorAttrKey_DataType = NV_SCI_BUF_TENSOR_ATTR_KEY_START,
  NvSciBufTensorAttrKey_NumDims,
  NvSciBufTensorAttrKey_SizePerDim,
  NvSciBufTensorAttrKey_AlignmentPerDim,
  NvSciBufTensorAttrKey_StridesPerDim,
  NvSciBufTensorAttrKey_PixelFormat,
  NvSciBufTensorAttrKey_BaseAddrAlign,
  NvSciBufTensorAttrKey_Size,
  NvSciBufArrayAttrKey_DataType = NV_SCI_BUF_ARRAY_ATTR_KEY_START,
  NvSciBufArrayAttrKey_Stride,
  NvSciBufArrayAttrKey_Capacity,
  NvSciBufArrayAttrKey_Size,
  NvSciBufArrayAttrKey_Alignment,
  NvSciBufPyramidAttrKey_NumLevels = NV_SCI_BUF_PYRAMID_ATTR_KEY_START,
  NvSciBufPyramidAttrKey_Scale,
  NvSciBufPyramidAttrKey_LevelOffset,
  NvSciBufPyramidAttrKey_LevelSize,
  NvSciBufPyramidAttrKey_Alignment,
  NvSciBufAttrKey_UpperBound = 0x3ffffffU
}
 Describes the NvSciBuf public attribute keys holding corresponding values specifying buffer constraints. More...
 

Enumeration Type Documentation

◆ NvSciBufAttrKey

Describes the NvSciBuf public attribute keys holding corresponding values specifying buffer constraints.

Input attribute keys specify desired buffer constraints and can be set/retrieved from unreconciled NvSciBufAttrList using NvSciBufAttrListGetAttrs()/NvSciBufAttrListSetAttrs() respectively. Output attribute keys specify actual buffer constraints computed by NvSciBuf if reconciliation succeeds. Output attributes can be retrieved from reconciled NvSciBufAttrList using NvSciBufAttrListGetAttrs().

Enumerator
NvSciBufAttrKey_LowerBound 

Specifies the lower bound value to check for a valid NvSciBuf attribute key type.

NvSciBufGeneralAttrKey_Types 

An array of all types that the buffer is expected to have.

For each type the buffer has, the associated attributes are valid. In order to set NvSciBufAttrKeys corresponding to the NvSciBufType, NvSciBufType must be set first using this key. NOTE: A single buffer may have multiple types. For example, a buffer may simultaneously be a NvSciBufType_Image (for integration with NvMedia), a NvSciBufType_Tensor (for integration with TensorRT or NvMedia), and a NvSciBufType_RawBuffer (for integration with CUDA kernels that will directly access it).

During reconciliation, if all the NvSciBufTypes specified by all the unreconciled NvSciBufAttrLists are same, this key outputs the specified NvSciBufType. If all NvSciBufTypes are not same, reconciliation succeeds only if the set of NvSciBufTypes contains NvSciBufType_Image and NvSciBufType_Tensor only otherwise reconciliation fails.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if aggregate of all the values of all the input unreconciled NvSciBufAttrList(s) that set this attribute are present in the reconciled NvSciBufAttrList.

Type: Input/Output attribute

Datatype: NvSciBufType[]

valid input value: All values defined by NvSciBufType for safety build such that NvSciBufType_General < value < NvSciBufType_MaxValid

NvSciBufGeneralAttrKey_NeedCpuAccess 

Specifies if CPU access is required for the buffer.

If this attribute is set to true, then the CPU will be able to obtain a pointer to the buffer from NvSciBufObjGetConstCpuPtr() if at least read permissions are granted or from NvSciBufObjGetCpuPtr() if read/write permissions are granted.

During reconciliation, reconciler sets value of this key to true in the reconciled NvSciBufAttrList if any of the unreconciled NvSciBufAttrList(s) involved in reconciliation that is owned by the reconciler has this key set to true, otherwise it is set to false in reconciled NvSciBufAttrList.

When importing the reconciled NvSciBufAttrList, for every peer owning the unreconciled NvSciBufAttrList(s) involved in reconciliation, if any of the unreconciled NvSciBufAttrList(s) owned by the peer set the key to true then value of this key is true in the reconciled NvSciBufAttrList imported by the peer otherwise its false.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds if value of this attribute in the reconciled NvSciBufAttrList is true provided any of the input unreconciled NvSciBufAttrList(s) owned by the peer set it to true OR if value of this attribute in the reconciled NvSciBufAttrList is false provided all of the input unreconciled NvSciBufAttrList(s) owned by the peer set it to false.

Type: Input/Output attribute

Datatype: bool

NvSciBufGeneralAttrKey_RequiredPerm 

Specifies buffer access permissions.

If reconciliation succeeds, granted buffer permissions are reflected in NvSciBufGeneralAttrKey_ActualPerm. If NvSciBufGeneralAttrKey_NeedCpuAccess is true and write permission are granted, then NvSciBufObjGetCpuPtr() can be used to obtain a non-const pointer to the buffer. NOTE: Whether this key is present in reconciled attribute lists is unspecified, as is its value if it is present.

Type: Input attribute

Datatype: NvSciBufAttrValAccessPerm

valid input value: NvSciBufAccessPerm_Readonly or NvSciBufAccessPerm_ReadWrite

NvSciBufGeneralAttrKey_EnableCpuCache 

Specifies whether to enable/disable CPU caching.

If set to true:

The CPU must perform write-back caching of the buffer to the greatest extent possible considering all the CPUs that are sharing the buffer. Coherency is guaranteed with:

  • Other CPU accessors.
  • All I/O-Coherent accessors that do not have CPU-invisible caches.

If set to false:

The CPU must not access the caches at all on read or write accesses to the buffer from applications. Coherency is guaranteed with:

  • Other CPU accessors.
  • All I/O accessors (whether I/O-coherent or not) that do not have CPU-invisible caches.

During reconciliation, this key is set to true in reconciled NvSciBufAttrList if any of the unreconciled NvSciBufAttrList owned by any peer set it to true.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds if value of this attribute in the reconciled NvSciBufAttrList is true provided any of the input unreconciled NvSciBufAttrList(s) set it to true OR if value of this attribute in the reconciled NvSciBufAttrList is false provided all of the input unreconciled NvSciBufAttrList(s) set it to false.

Type: Input/Output attribute

Datatype: bool

NvSciBufGeneralAttrKey_GpuId 

GpuIDs of the GPUs in the system that will access the buffer.

In a multi GPU System, if multiple GPUs are supposed to access the buffer, then provide the GPU IDs of all the GPUs that need to access the buffer. The GPU which is not specified in the list of GPUIDs may not be able to access the buffer.

During reconciliation, the value of this key in reconciled NvSciBufAttrList is equivalent to the aggregate of all the values specified by all the unreconciled NvSciBufAttrLists involved in reconciliation.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if aggregate of all the values of all the input unreconciled NvSciBufAttrList(s) that set it are present in the reconciled NvSciBufAttrList.

Type: Input/Output attribute

Datatype: NvSciRmGpuId[]

valid input value: Valid NvSciRmGpuId of the GPU(s) present in the system.

NvSciBufGeneralAttrKey_CpuNeedSwCacheCoherency 

Indicates whether the CPU is required to flush before reads and after writes.

This can be accomplished using NvSciBufObjFlushCpuCacheRange(), or (if the application prefers) with OS-specific flushing functions. It is set to true in reconciled NvSciBufAttrList if both NvSciBufGeneralAttrKey_EnableCpuCache and NvSciBufGeneralAttrKey_NeedCpuAccess are requested by setting them to true in any of the unreconciled NvSciBufAttrList(s) from which reconciled NvSciBufAttrList is obtained.

Type: Output attribute

Datatype: bool

NvSciBufGeneralAttrKey_ActualPerm 

Specifies the buffer access permissions to the NvSciBufObj.

This key is only valid in reconciled NvSciBufAttrList and undefined in unreconciled NvSciBufAttrList.

During reconciliation, this key is set to the maximum value of the requested permission set in NvSciBufGeneralAttrKey_RequiredPerm of all the unreconciled NvSciBufAttrLists that are owned by the reconciler and are involved in the reconciliation.

If NvSciBufObj is obtained by calling NvSciBufObjAlloc(), NvSciBufGeneralAttrKey_ActualPerm is set to NvSciBufAccessPerm_ReadWrite in the reconciled NvSciBufAttrList corresponding to it since allocated NvSciBufObj gets read-write permissions by default.

For any peer importing the reconciled NvSciBufAttrList, this key is set to maximum value of the requested permission set in NvSciBufGeneralAttrKey_RequiredPerm of all the unreconciled NvSciBufAttrLists that were exported by the peer for reconciliation. The key is set by the reconciler when exporting the reconciled NvSciBufAttrList.

For any peer importing the NvSciBufObj, this key is set in the reconciled NvSciBufAttrList to the permissions associated with NvSciBufObjIpcExportDescriptor.

Type: Output attribute

Datatype: NvSciBufAttrValAccessPerm

NvSciBufGeneralAttrKey_VidMem_GpuId 

GPU ID of dGPU from which vidmem allocation should come when multiple GPUs are sharing buffer.

This key should be empty if multiple GPUs access shared buffer from sysmem.

Type: Input/Output attribute

Datatype: NvSciRmGpuId

valid input value: Valid NvSciRmGpuId of the dGPU present in the system.

NvSciBufRawBufferAttrKey_Size 

Specifies the size of the buffer to be allocated for NvSciBufType_RawBuffer.

Input size specified in unreconciled NvSciBufAttrList should be greater than 0.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint64_t

NvSciBufRawBufferAttrKey_Align 

Specifies the alignment requirement of NvSciBufType_RawBuffer.

Input alignment should be power of 2. If more than one unreconciled NvSciBufAttrLists specify this input attribute, value in the reconciled NvSciBufAttrList corresponds to maximum of the values specified in all of the unreconciled NvSciBufAttrLists.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList is greater than or equal to the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint64_t

valid input value: value is power of 2.

NvSciBufImageAttrKey_Layout 

Specifies the layout of NvSciBufType_Image: Block-linear or Pitch-linear.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: NvSciBufAttrValImageLayoutType

valid input value: Any value defined by NvSciBufAttrValImageLayoutType enum.

NvSciBufImageAttrKey_TopPadding 

Specifies the top padding for the NvSciBufType_Image.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint64_t[]

NvSciBufImageAttrKey_BottomPadding 

Specifies the bottom padding for the NvSciBufType_Image.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint64_t[]

NvSciBufImageAttrKey_LeftPadding 

Specifies the left padding for the NvSciBufType_Image.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint64_t[]

NvSciBufImageAttrKey_RightPadding 

Specifies the right padding for the NvSciBufType_Image.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint64_t[]

NvSciBufImageAttrKey_VprFlag 

Specifies the VPR flag for the NvSciBufType_Image.

During reconciliation, this key is set to true in reconciled NvSciBufAttrList if any of the unreconciled NvSciBufAttrList owned by any peer set it to true.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds if value of this attribute in the reconciled NvSciBufAttrList is true provided any of the input unreconciled NvSciBufAttrList(s) set it to true OR if value of this attribute in the reconciled NvSciBufAttrList is false provided all of the input unreconciled NvSciBufAttrList(s) set it to false.

Type: Input/Output attribute

Datatype: bool

NvSciBufImageAttrKey_Size 

Output size of the NvSciBufType_Image after successful reconciliation.

The output size for this key is computed by aggregating size of all the planes in the output key NvSciBufImageAttrKey_PlaneAlignedSize.

Type: Output attribute

Datatype: uint64_t

NvSciBufImageAttrKey_Alignment 

Output alignment of the NvSciBufType_Image after successful reconciliation.

The output value of this key is same as alignment value of the first plane in the key NvSciBufImageAttrKey_PlaneBaseAddrAlign after reconciliation.

Type: Output attribute

Datatype: uint64_t

NvSciBufImageAttrKey_PlaneCount 

Specifies the number of planes for NvSciBufType_Image.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match. If NvSciBufType_Image and NvSciBufType_Tensor are involved in reconciliation and if this attribute is set in any of unreconciled NvSciBufAttrList(s) to be reconciled, the value of this attribute should be 1.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it. Additionally, if one or more input unreconciled NvSciBufAttrList(s) specify NvSciBufType_Image and NvSciBufType_Tensor as NvSciBufTypes in their NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList is 1.

Type: Input/Output attribute

Datatype: uint32_t

valid input value: 1 <= value <= NV_SCI_BUF_IMAGE_MAX_PLANES

NvSciBufImageAttrKey_PlaneColorFormat 

Specifies the NvSciBufAttrValColorFmt of the NvSciBufType_Image plane.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: NvSciBufAttrValColorFmt[]

valid input value: NvSciColor_LowerBound < value < NvSciColor_UpperBound

NvSciBufImageAttrKey_PlaneColorStd 

Specifies a set of plane color standards.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: NvSciBufAttrValColorStd[]

valid input value: Any value defined by NvSciBufAttrValColorStd enum.

NvSciBufImageAttrKey_PlaneBaseAddrAlign 

Specifies the NvSciBufType_Image plane base address alignment for every plane in terms of an array.

Input alignment must be power of 2. If more than one unreconciled NvSciBufAttrLists specify this attribute, reconciled NvSciBufAttrList has maximum alignment value per array index of the values specified in unreconciled NvSciBufAttrLists for the same array index. On top of that, for all the HW engines for which buffer is being allocated, if the maximum start address alignment constraint of all the engines taken together is greater than the reconciled alignment value at any index, it is replaced with start address alignment value. In other words, reconciled alignment per array index = MAX(MAX(alignments in unreconciled list at the same index), MAX(start address alignment constraint of all the engines))

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList is greater than or equal to the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint32_t[]

valid input value: value is power of 2.

NvSciBufImageAttrKey_PlaneWidth 

Specifies the NvSciBufType_Image plane width in pixels.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint32_t[]

NvSciBufImageAttrKey_PlaneHeight 

Specifies the NvSciBufType_Image plane height in number of lines.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint32_t[]

NvSciBufImageAttrKey_PlaneScanType 

Specifies the NvSciBufType_Image scan type: Progressive or Interlaced.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: NvSciBufAttrValImageScanType

valid input value: Any value defined by NvSciBufAttrValImageScanType enum.

NvSciBufImageAttrKey_ScanType 
NvSciBufImageAttrKey_PlaneBitsPerPixel 

Outputs number of bits per pixel corresponding to the NvSciBufAttrValColorFmt for each plane specified in NvSciBufImageAttrKey_PlaneColorFormat.

Type: Output attribute

Datatype: uint32_t[]

NvSciBufImageAttrKey_PlaneOffset 

Indicates the starting offset of the NvSciBufType_Image plane from the first plane.

Type: Output attribute

Datatype: uint64_t[]

NvSciBufImageAttrKey_PlaneDatatype 

Outputs the NvSciBufAttrValDataType of each plane based on the NvSciBufAttrValColorFmt provided in NvSciBufImageAttrKey_PlaneColorFormat for every plane.

Type: Output attribute

Datatype: NvSciBufAttrValDataType[]

NvSciBufImageAttrKey_PlaneChannelCount 

Outputs number of channels per plane.

Type: Output attribute

Datatype: uint8_t[]

NvSciBufImageAttrKey_PlaneSecondFieldOffset 

Indicates the offset of the start of the second field, 0 for progressive valid for interlaced.

Type: Output attribute

Datatype: uint64_t[]

NvSciBufImageAttrKey_PlanePitch 

Outputs the pitch (aka width in bytes) for every plane.

The pitch is aligned to the maximum of the pitch alignment constraint value of all the HW engines that are going to operate on the buffer.

Type: Output attribute

Datatype: uint32_t[]

NvSciBufImageAttrKey_PlaneAlignedHeight 

Outputs the aligned height of evey plane in terms of number of lines.

This height is calculated by aligning value for every plane provided in NvSciBufImageAttrKey_PlaneHeight with maximum of the height alignment constraints of all the engines that are going to operate on the buffer. The output value is always power of 2.

Type: Output attribute

Datatype: uint32_t[]

NvSciBufImageAttrKey_PlaneAlignedSize 

Indicates the aligned size of every plane.

The size is calculated from the value of NvSciBufImageAttrKey_PlanePitch and NvSciBufImageAttrKey_PlaneAlignedHeight.

Type: Output attribute

Datatype: uint64_t[]

NvSciBufImageAttrKey_ImageCount 

Attribute to specify number of NvSciBufType_Image(s) for which buffer should be allocated.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match. NvSciBuf supports allocating buffer for single image only and thus, this attribute should be set to 1. A single buffer cannot be allocated for multiple images. Allocating 'N' buffers corresponding to 'N' images is allowed

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute Datatype: uint64_t

valid input value: 1

NvSciBufTensorAttrKey_DataType 

Specifies the tensor data type.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: NvSciBufAttrValDataType

valid input value: NvSciDataType_Int4 <= value <= NvSciDataType_Float32

NvSciBufTensorAttrKey_NumDims 

Specifies the number of tensor dimensions.

A maximum of 8 dimensions are allowed. If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match. If NvSciBufType_Image and NvSciBufType_Tensor NvSciBufTypes are used in reconciliation, reconciliation succeeds only if this key is set to 4, since NvSciBuf only supports reconciliation of NvSciBufType_Tensor of NHWC type with NvSciBufType_Image.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it. Additionally, if one or more input unreconciled NvSciBufAttrList(s) specify NvSciBufType_Image and NvSciBufType_Tensor as NvSciBufTypes in their NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList is 4.

Type: Input/Output attribute

Datatype: uint32_t

valid input value: 1 <= value <= NV_SCI_BUF_TENSOR_MAX_DIMS

NvSciBufTensorAttrKey_SizePerDim 

Specifies the size of each tensor dimension.

This attribute takes size value in terms of an array. If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match. Number of elements in value array of this attribute should not be less than value specified by NvSciBufTensorAttrKey_NumDims attribute.

Note
Array indices are not tied to the semantics of the dimension if NvSciBufType_Tensor is the only NvSciBufType involved in reconciliation. If NvSciBufType_Tensor and NvSciBufType_Image are involved in reconciliation, NvSciBuf only supports reconciliation of NvSciBufType_Image with NHWC NvSciBufType_Tensor where N=1 and thus reconciliation succeeds only if value of dimension 0 is 1 and it matches with value of NvSciBufImageAttrKey_ImageCount, value of dimension 1 matches with value of NvSciBufImageAttrKey_PlaneHeight, value of dimension 2 matches with value of NvSciBufImageAttrKey_PlaneWidth and dimension 3 specifies channel count for NvSciBufAttrValColorFmt specified in NvSciBufTensorAttrKey_PixelFormat key

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it. Additionally, if one or more input unreconciled NvSciBufAttrList(s) specify NvSciBufType_Image and NvSciBufType_Tensor as NvSciBufTypes in their NvSciBufAttrList(s), validation succeeds only if value of dimension 0 in reconciled NvSciBufAttrList is 1 and it matches with value of NvSciBufImageAttrKey_ImageCount in the same NvSciBufAttrList, value of dimension 1 matches with value of NvSciBufImageAttrKey_PlaneHeight in the same reconciled NvSciBufAttrList, value of dimension 2 matches with value of NvSciBufImageAttrKey_PlaneWidth in the same reconciled NvSciBufAttrList and dimension 3 matches with channel count for NvSciBufAttrValColorFmt specified in NvSciBufTensorAttrKey_PixelFormat in the same reconciled NvSciBufAttrList.

Type: Input/Output attribute

Datatype: uint64_t[]

NvSciBufTensorAttrKey_AlignmentPerDim 

Specifies the alignment constraints per tensor dimension.

Number of elements in value array of this attribute should not be less than value specified by NvSciBufTensorAttrKey_NumDims attribute. Value of every element in the value array should be power of two.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value in every index of value array of this attribute in reconciled NvSciBufAttrList is greater than or equal to the value in the same index of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint32_t[]

valid input value: value is power of 2.

NvSciBufTensorAttrKey_StridesPerDim 

Returns the stride value (in bytes) for each tensor dimension.

Note
The returned array contains stride values in decreasing order. In other words, the index 0 of the array will have the largest stride while [number-of-dims - 1] index will have the smallest stride.

Type: Output attribute

Datatype: uint64_t[]

NvSciBufTensorAttrKey_PixelFormat 

Attribute providing pixel format of the tensor.

This key needs to be set only if NvSciBufType_Image and NvSciBufType_Tensor are involved in reconciliation. If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match. Additionally, reconciliation succeeds only if value of this attribute matches with the value of NvSciBufImageAttrKey_PlaneColorFormat in all the input unreconciled NvSciBufAttrList(s) that have set it. Image/Tensor reconciliation only supports NvSciColor_A8B8G8R8 and NvSciColor_Float_A16B16G16R16 color formats as of now.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList matches with the value of the same attribute in every input unreconciled NvSciBufAttrList that set it. Additionally, reconciliation succeeds only if value of this attribute matches with NvSciBufImageAttrKey_PlaneColorFormat attribute in the same reconciled NvSciBufAttrList and value is set to either NvSciColor_A8B8G8R8 or NvSciColor_Float_A16B16G16R16.

Type: Input/Output attribute

Datattype: NvSciBufAttrValColorFmt

valid input value: NvSciColor_LowerBound < value < NvSciColor_UpperBound

NvSciBufTensorAttrKey_BaseAddrAlign 

Attribute providing base address alignment requirements for tensor.

Input value provided for this attribute must be power of two. Output value of this attribute is always power of two.

During validation of reconciled NvSciBufAttrList against input unreconciled NvSciBufAttrList(s), validation succeeds only if value of this attribute in reconciled NvSciBufAttrList is greater than or equal to the value of the same attribute in every input unreconciled NvSciBufAttrList that set it.

Type: Input/Output attribute

Datatype: uint64_t

valid input value: value is power of 2.

NvSciBufTensorAttrKey_Size 

Size of buffer allocated for 'N' tensors.

Type: Output attribute

Datatype: uint64_t

NvSciBufArrayAttrKey_DataType 

Specifies the data type of a NvSciBufType_Array.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

Type: Input/Output attribute

Datatype: NvSciBufAttrValDataType

valid input value: NvSciDataType_Int4 <= value <= NvSciDataType_Bool

NvSciBufArrayAttrKey_Stride 

Specifies the stride of each element in the NvSciBufType_Array.

Stride must be greater than or equal to size of datatype specified by NvSciBufArrayAttrKey_DataType. If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

Type: Input/Output attribute

Datatype: uint64_t

NvSciBufArrayAttrKey_Capacity 

Specifies the NvSciBufType_Array capacity.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

Type: Input/Output attribute

Datatype: uint64_t

NvSciBufArrayAttrKey_Size 

Indicates the total size of a NvSciBufType_Array.

Type: Output attribute

Datatype: uint64_t

NvSciBufArrayAttrKey_Alignment 

Indicates the base alignment of a NvSciBufType_Array.

Type: Output attribute

Datatype: uint64_t

NvSciBufPyramidAttrKey_NumLevels 

Specifies the number of levels of images in a pyramid.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

Type: Input/Output attribute

Datatype: uint32_t

valid input value: 1 <= value <= NV_SCI_BUF_PYRAMID_MAX_LEVELS

NvSciBufPyramidAttrKey_Scale 

Specifies the scaling factor by which each successive image in a pyramid must be scaled.

If more than one unreconciled NvSciBufAttrLists specify this input attribute, reconciliation is successful if all the input attributes of this type match.

Type: Input/Output attribute

Datatype: float

valid input value: 0.0f < value <= 1.0f

NvSciBufPyramidAttrKey_LevelOffset 

NvSciBuf allocates the total buffer size considering all levels in an image pyramid and returns an array of buffer offsets for each level.

Type: Output attribute

Datatype: uint64_t[]

NvSciBufPyramidAttrKey_LevelSize 

NvSciBuf allocates the total buffer size considering all levels in an image pyramid and returns an array of buffer sizes for each level.

Type: Output attribute

Datatype: uint64_t[]

NvSciBufPyramidAttrKey_Alignment 

Alignment attribute of pyramid.

Type: Output attribute Datatype: uint64_t

NvSciBufAttrKey_UpperBound 

Specifies the maximum number of NvSciBuf attribute keys.

The total space for keys is 32K.

Datatype: None

Definition at line 359 of file nvscibuf.h.