/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-mivisionx/checkouts/docs-5.7.0/amd_openvx/openvx/include/vx_ext_amd.h File Reference

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-mivisionx/checkouts/docs-5.7.0/amd_openvx/openvx/include/vx_ext_amd.h File Reference#

MIVisionX: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-mivisionx/checkouts/docs-5.7.0/amd_openvx/openvx/include/vx_ext_amd.h File Reference
vx_ext_amd.h File Reference

The AMD OpenVX Extension Library. More...

#include <VX/vx.h>
#include <VX/vx_khr_nn.h>

Go to the source code of this file.

Data Structures

struct  AgoImageFormatDescription
 AMD data structure for image format information. More...
 
struct  AgoTargetAffinityInfo
 AMD data structure to specify target affinity. More...
 
struct  AgoContextTextMacroInfo
 AMD data structure to set a text macro. More...
 
struct  AgoGraphImportInfo
 AMD data structure to import a graph from a text.text: "macro <macro-name>" to use a pre-defined macro "file <file-name>" to load from a file otherwise use the text as is. More...
 
struct  AgoGraphExportInfo
 AMD data structure to export a graph to a text. More...
 
struct  AgoGraphPerfInternalInfo
 AMD data structure to get internal performance data. More...
 
struct  AgoNodeMergeRule_t
 AMD data structure to specify node merge rule. More...
 

Macros

#define AGO_TARGET_AFFINITY_CPU   0x0010
 AMD target affinity enumerations for AgoTargetAffinityInfo.device_type.
 
#define AGO_TARGET_AFFINITY_GPU   0x0020
 
#define AGO_TARGET_AFFINITY_APU   0x0030
 
#define AGO_MAX_PARAMS   32
 AMD internal parameters. [TODO: This needs to be moved to ago_internal.h].
 
#define AGO_MERGE_RULE_MAX_FIND   4
 
#define AGO_MERGE_RULE_MAX_REPLACE   4
 
#define AGO_MERGE_RULE_SOLITARY_FLAG   0x20
 
#define AGO_TARGET_AFFINITY_GPU_INFO_DEVICE_MASK   0x0F
 
#define AGO_TARGET_AFFINITY_GPU_INFO_SVM_MASK   0xF0
 
#define AGO_TARGET_AFFINITY_GPU_INFO_SVM_ENABLE   0x10
 
#define AGO_TARGET_AFFINITY_GPU_INFO_SVM_AS_CLMEM   0x20
 
#define AGO_TARGET_AFFINITY_GPU_INFO_SVM_NO_FGS   0x40
 
#define VX_MAX_STRING_BUFFER_SIZE_AMD   256
 Maximum size of scalar string buffer. The local buffers used for accessing scalar strings should be of size VX_MAX_STRING_BUFFER_SIZE_AMD and the maximum allowed string length is VX_MAX_STRING_BUFFER_SIZE_AMD-1.
 
#define VX_NN_ACTIVATION_LEAKY_RELU   (VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x9)
 The Neural Network activation functions vx_nn_activation_function_e extension.
 
#define VX_CONTEXT_ATTRIBUTE_NONLINEAR_MAX_DIMENSION   VX_CONTEXT_NONLINEAR_MAX_DIMENSION
 The attributes for vx_context.
 
#define VX_CONTEXT_ATTRIBUTE_IMMEDIATE_BORDER_POLICY   VX_CONTEXT_IMMEDIATE_BORDER_POLICY
 
#define VX_GRAPH_ATTRIBUTE_STATE   VX_GRAPH_STATE
 The attributes for vx_graph.
 
#define VX_OBJECT_ARRAY_ATTRIBUTE_ITEMTYPE   VX_OBJECT_ARRAY_ITEMTYPE
 The attributes for vx_object_array.
 
#define VX_OBJECT_ARRAY_ATTRIBUTE_NUMITEMS   VX_OBJECT_ARRAY_NUMITEMS
 

Typedefs

typedef struct _vx_tensor_t * vx_tensor
 The multidimensional data object (Tensor). More...
 
typedef struct AgoNodeMergeRule_t AgoNodeMergeRule
 AMD data structure to specify node merge rule.
 

Enumerations

enum  ago_type_public_e {
  VX_TYPE_STRING_AMD = 0x011 , AGO_TYPE_KEYPOINT_XYS = VX_TYPE_VENDOR_STRUCT_START , AGO_TYPE_MEANSTDDEV_DATA = VX_TYPE_VENDOR_OBJECT_START , AGO_TYPE_MINMAXLOC_DATA ,
  AGO_TYPE_CANNY_STACK , AGO_TYPE_SCALE_MATRIX
}
 The type enumeration lists all the AMD specific types in OpenVX. More...
 
enum  vx_context_attribute_amd_e {
  VX_CONTEXT_ATTRIBUTE_AMD_OPENCL_CONTEXT = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_CONTEXT) + 0x01 , VX_CONTEXT_ATTRIBUTE_AMD_AFFINITY = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_CONTEXT) + 0x02 , VX_CONTEXT_ATTRIBUTE_AMD_SET_TEXT_MACRO = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_CONTEXT) + 0x03 , VX_CONTEXT_ATTRIBUTE_AMD_SET_MERGE_RULE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_CONTEXT) + 0x04 ,
  VX_CONTEXT_MAX_TENSOR_DIMENSIONS = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_CONTEXT) + 0x05 , VX_CONTEXT_CL_QUEUE_PROPERTIES = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_CONTEXT) + 0x06 , VX_CONTEXT_ATTRIBUTE_AMD_HIP_DEVICE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_CONTEXT) + 0x07
}
 The AMD context attributes list. More...
 
enum  vx_kernel_attribute_amd_e {
  VX_KERNEL_ATTRIBUTE_AMD_QUERY_TARGET_SUPPORT = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_KERNEL) + 0x01 , VX_KERNEL_ATTRIBUTE_AMD_OPENCL_CODEGEN_CALLBACK = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_KERNEL) + 0x02 , VX_KERNEL_ATTRIBUTE_AMD_NODE_REGEN_CALLBACK = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_KERNEL) + 0x03 , VX_KERNEL_ATTRIBUTE_AMD_OPENCL_GLOBAL_WORK_UPDATE_CALLBACK = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_KERNEL) + 0x04 ,
  VX_KERNEL_ATTRIBUTE_AMD_GPU_BUFFER_ACCESS_ENABLE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_KERNEL) + 0x05 , VX_KERNEL_ATTRIBUTE_AMD_GPU_BUFFER_UPDATE_CALLBACK = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_KERNEL) + 0x06
}
 The AMD kernel attributes list. More...
 
enum  vx_graph_attribute_amd_e {
  VX_GRAPH_ATTRIBUTE_AMD_AFFINITY = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x01 , VX_GRAPH_ATTRIBUTE_AMD_IMPORT_FROM_TEXT = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x02 , VX_GRAPH_ATTRIBUTE_AMD_EXPORT_TO_TEXT = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x03 , VX_GRAPH_ATTRIBUTE_AMD_OPTIMIZER_FLAGS = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x04 ,
  VX_GRAPH_ATTRIBUTE_AMD_PERFORMANCE_INTERNAL_LAST = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x05 , VX_GRAPH_ATTRIBUTE_AMD_PERFORMANCE_INTERNAL_AVG = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x06 , VX_GRAPH_ATTRIBUTE_AMD_PERFORMANCE_INTERNAL_PROFILE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x07 , VX_GRAPH_ATTRIBUTE_AMD_OPENCL_COMMAND_QUEUE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x08 ,
  VX_GRAPH_ATTRIBUTE_AMD_CPU_NUM_THREADS = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x09
}
 The AMD graph attributes list. More...
 
enum  vx_node_attribute_amd_e { VX_NODE_ATTRIBUTE_AMD_AFFINITY = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x01 , VX_NODE_ATTRIBUTE_AMD_OPENCL_COMMAND_QUEUE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x02 , VX_NODE_ATTRIBUTE_AMD_HIP_STREAM = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x03 , VX_NODE_ATTRIBUTE_AMD_CPU_NUM_THREADS = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x04 }
 The AMD node attributes list. More...
 
enum  vx_image_attribute_amd_e {
  VX_IMAGE_ATTRIBUTE_AMD_OPENCL_BUFFER = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_IMAGE) + 0x01 , VX_IMAGE_ATTRIBUTE_AMD_GPU_BUFFER_OFFSET = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_IMAGE) + 0x02 , VX_IMAGE_ATTRIBUTE_AMD_ENABLE_USER_BUFFER_GPU = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_IMAGE) + 0x03 , VX_IMAGE_ATTRIBUTE_AMD_GPU_BUFFER_STRIDE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_IMAGE) + 0x04 ,
  VX_IMAGE_ATTRIBUTE_AMD_HOST_BUFFER = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_IMAGE) + 0x05 , VX_IMAGE_ATTRIBUTE_AMD_HIP_BUFFER = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_IMAGE) + 0x06
}
 The AMD image attributes list. More...
 
enum  vx_tensor_attribute_amd_e {
  VX_TENSOR_STRIDE_GPU = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_TENSOR) + 0x5 , VX_TENSOR_OFFSET_GPU = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_TENSOR) + 0x6 , VX_TENSOR_BUFFER_OPENCL = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_TENSOR) + 0x7 , VX_TENSOR_BUFFER_HIP = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_TENSOR) + 0x8 ,
  VX_TENSOR_MEMORY_TYPE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_TENSOR) + 0x9 , VX_TENSOR_BUFFER_HOST = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_TENSOR) + 0x10
}
 The AMD tensor data attributes. More...
 
enum  vx_array_attribute_amd_e { VX_ARRAY_BUFFER_OPENCL = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_ARRAY) + 0x9 , VX_ARRAY_BUFFER_HIP = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_ARRAY) + 0x10 , VX_ARRAY_BUFFER = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_ARRAY) + 0x11 , VX_ARRAY_OFFSET_GPU = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_ARRAY) + 0x12 }
 The AMD array data attributes. More...
 
enum  vx_directive_amd_e {
  VX_DIRECTIVE_AMD_READ_ONLY = VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_DIRECTIVE) + 0x01 , VX_DIRECTIVE_AMD_COPY_TO_OPENCL = VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_DIRECTIVE) + 0x02 , VX_DIRECTIVE_AMD_ENABLE_PROFILE_CAPTURE = VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_DIRECTIVE) + 0x03 , VX_DIRECTIVE_AMD_DISABLE_PROFILE_CAPTURE = VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_DIRECTIVE) + 0x04 ,
  VX_DIRECTIVE_AMD_DISABLE_GPU_FLUSH = VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_DIRECTIVE) + 0x05 , VX_DIRECTIVE_AMD_COPY_TO_HIPMEM = VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_DIRECTIVE) + 0x02
}
 These enumerations are given to the vxDirective API to enable/disable platform optimizations and/or features. Directives are not optional and usually are vendor-specific, by defining a vendor range of directives and starting their enumeration from there. More...
 
enum  vx_memory_type_amd_e { VX_MEMORY_TYPE_OPENCL = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_MEMORY_TYPE) + 0x2 , VX_MEMORY_TYPE_HIP = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_MEMORY_TYPE) + 0x3 }
 An enumeration of additional memory type imports. More...
 
enum  vx_color_space_amd_e { VX_COLOR_SPACE_BT2020 = VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_COLOR_SPACE) + 0x1 }
 The image color space list used by the VX_IMAGE_SPACE attribute of a vx_image. More...
 
enum  vx_df_image_amd_e {
  VX_DF_IMAGE_U1_AMD = VX_DF_IMAGE('U', '0', '0', '1') , VX_DF_IMAGE_F16_AMD = VX_DF_IMAGE('F', '0', '1', '6') , VX_DF_IMAGE_F32_AMD = VX_DF_IMAGE('F', '0', '3', '2') , VX_DF_IMAGE_F64_AMD = VX_DF_IMAGE('F', '0', '6', '4') ,
  VX_DF_IMAGE_F32x3_AMD = VX_DF_IMAGE('F', '3', '3', '2')
}
 Based on the VX_DF_IMAGE definition. More...
 
enum  vx_scalar_attribute_amd_e { VX_SCALAR_BUFFER = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_SCALAR) + 0x1 }
 scalar data attributes. More...
 

Functions

VX_API_ENTRY vx_status VX_API_CALL vxGetReferenceName (vx_reference ref, vx_char name[], vx_size size)
 Retrieve the name of a reference. More...
 
VX_API_ENTRY vx_status VX_API_CALL vxSetModuleInternalData (vx_context context, const vx_char *module, void *ptr, vx_size size)
 Set module internal data. More...
 
VX_API_ENTRY vx_status VX_API_CALL vxGetModuleInternalData (vx_context context, const vx_char *module, void **ptr, vx_size *size)
 Retrieve module internal data. More...
 
VX_API_ENTRY vx_status VX_API_CALL vxSetModuleHandle (vx_node node, const vx_char *module, void *ptr)
 Set module handle. More...
 
VX_API_ENTRY vx_status VX_API_CALL vxGetModuleHandle (vx_node node, const vx_char *module, void **ptr)
 Retrieve module handle. More...
 
VX_API_ENTRY vx_status VX_API_CALL vxSetContextImageFormatDescription (vx_context context, vx_df_image format, const AgoImageFormatDescription *desc)
 Set custom image format description. More...
 
VX_API_ENTRY vx_status VX_API_CALL vxGetContextImageFormatDescription (vx_context context, vx_df_image format, AgoImageFormatDescription *desc)
 Get custom image format description. More...
 
VX_API_ENTRY vx_status VX_API_CALL vxAliasTensor (vx_tensor tensorMaster, vx_size offset, vx_tensor tensor)
 vxAliasTensor. More...
 
VX_API_ENTRY vx_bool VX_API_CALL vxIsTensorAliased (vx_tensor tensorMaster, vx_size offset, vx_tensor tensor)
 vxIsTensorAliased. More...
 

Detailed Description

The AMD OpenVX Extension Library.