AMD rocAL - Types

AMD rocAL - Types#

rocAL: API: AMD rocAL - Types
API: AMD rocAL - Types

The AMD rocAL Types. More...

Data Structures

struct  TimingInfo
 Timing Info struct. More...
 
struct  RocalJointsData
 rocAL Joints Data struct - HRNet training expects meta data (joints_data) in below format, so added here as a type for exposing to user More...
 

Macros

#define ROCAL_MEMCPY_TO_HOST   1
 AMD rocAL external memcpy flags - force copy to user provided host memory.
 
#define ROCAL_MEMCPY_TO_DEVICE   2
 AMD rocAL external memcpy flags - force copy to user provided device memory (gpu)
 
#define ROCAL_MEMCPY_IS_PINNED   4
 AMD rocAL external memcpy flags - for future use.
 

Typedefs

typedef void * RocalFloatParam
 typedef void* Float Param
 
typedef void * RocalIntParam
 typedef void* rocAL Int Param
 
typedef void * RocalContext
 typedef void* rocAL Context
 

Enumerations

enum  RocalStatus {
  ROCAL_OK = 0 , ROCAL_CONTEXT_INVALID , ROCAL_RUNTIME_ERROR , ROCAL_UPDATE_PARAMETER_FAILED ,
  ROCAL_INVALID_PARAMETER_TYPE
}
 rocAL Status enum More...
 
enum  RocalImageColor { ROCAL_COLOR_RGB24 = 0 , ROCAL_COLOR_BGR24 = 1 , ROCAL_COLOR_U8 = 2 , ROCAL_COLOR_RGB_PLANAR = 3 }
 rocAL Image Color enum More...
 
enum  RocalProcessMode { ROCAL_PROCESS_GPU = 0 , ROCAL_PROCESS_CPU = 1 }
 rocAL Process Mode enum More...
 
enum  RocalFlipAxis { ROCAL_FLIP_HORIZONTAL = 0 , ROCAL_FLIP_VERTICAL = 1 }
 rocAL Flip Axis enum More...
 
enum  RocalImageSizeEvaluationPolicy {
  ROCAL_USE_MAX_SIZE = 0 , ROCAL_USE_USER_GIVEN_SIZE = 1 , ROCAL_USE_MOST_FREQUENT_SIZE = 2 , ROCAL_USE_USER_GIVEN_SIZE_RESTRICTED = 3 ,
  ROCAL_USE_MAX_SIZE_RESTRICTED = 4
}
 rocAL Image Size Evaluation Policy enum More...
 
enum  RocalDecodeDevice { ROCAL_HW_DECODE = 0 , ROCAL_SW_DECODE = 1 }
 rocAL Decode Device enum More...
 
enum  RocalTensorLayout {
  ROCAL_NHWC = 0 , ROCAL_NCHW = 1 , ROCAL_NFHWC = 2 , ROCAL_NFCHW = 3 ,
  ROCAL_NHW = 4 , ROCAL_NFT = 5 , ROCAL_NTF = 6 , ROCAL_NONE = 7
}
 rocAL Tensor Layout enum More...
 
enum  RocalTensorOutputType {
  ROCAL_FP32 = 0 , ROCAL_FP16 = 1 , ROCAL_UINT8 = 2 , ROCAL_INT8 = 3 ,
  ROCAL_UINT32 = 4 , ROCAL_INT32 = 5
}
 rocAL Tensor Output Type enum More...
 
enum  RocalDecoderType {
  ROCAL_DECODER_TJPEG = 0 , ROCAL_DECODER_OPENCV = 1 , ROCAL_DECODER_HW_JPEG = 2 , ROCAL_DECODER_VIDEO_FFMPEG_SW = 3 ,
  ROCAL_DECODER_VIDEO_FFMPEG_HW = 4 , ROCAL_DECODER_AUDIO_GENERIC = 5
}
 rocAL Decoder Type enum More...
 
enum  RocalResizeScalingMode {
  ROCAL_SCALING_MODE_DEFAULT = 0 , ROCAL_SCALING_MODE_STRETCH = 1 , ROCAL_SCALING_MODE_NOT_SMALLER = 2 , ROCAL_SCALING_MODE_NOT_LARGER = 3 ,
  ROCAL_SCALING_MODE_MIN_MAX = 4
}
 rocAL Resize Scaling Mode enum More...
 
enum  RocalResizeInterpolationType {
  ROCAL_NEAREST_NEIGHBOR_INTERPOLATION = 0 , ROCAL_LINEAR_INTERPOLATION = 1 , ROCAL_CUBIC_INTERPOLATION = 2 , ROCAL_LANCZOS_INTERPOLATION = 3 ,
  ROCAL_GAUSSIAN_INTERPOLATION = 4 , ROCAL_TRIANGULAR_INTERPOLATION = 5
}
 rocAL Resize Interpolation Type enum More...
 
enum  RocalTensorBackend { ROCAL_CPU = 0 , ROCAL_GPU = 1 }
 Tensor Backend. More...
 
enum class  RocalROICordsType { ROCAL_LTRB = 0 , ROCAL_XYWH = 1 }
 Tensor ROI type. More...
 
enum  RocalExternalSourceMode { ROCAL_EXTSOURCE_FNAME = 0 , ROCAL_EXTSOURCE_RAW_COMPRESSED = 1 , ROCAL_EXTSOURCE_RAW_UNCOMPRESSED = 2 }
 RocalExternalSourceMode struct. More...
 
enum  RocalAudioBorderType { ROCAL_ZERO = 0 , ROCAL_CLAMP = 1 , ROCAL_REFLECT = 2 }
 rocAL Audio Border Type enum More...
 
enum  RocalOutOfBoundsPolicy { ROCAL_PAD = 0 , ROCAL_TRIMTOSHAPE , ROCAL_ERROR }
 rocAL Out Of Bounds Policy Type enum More...
 
enum  RocalMelScaleFormula { ROCAL_MELSCALE_SLANEY = 0 , ROCAL_MELSCALE_HTK }
 rocAL MelScale formula enum More...
 
enum  RocalLastBatchPolicy { ROCAL_LAST_BATCH_FILL = 0 , ROCAL_LAST_BATCH_DROP = 1 , ROCAL_LAST_BATCH_PARTIAL = 2 }
 Tensor Last Batch Policies. More...
 
typedef std::vector< int > ImageIDBatch
 typedef std::vectors
 
typedef std::vector< int > AnnotationIDBatch
 typedef std::vectors
 
typedef std::vector< std::string > ImagePathBatch
 typedef std::vectors
 
typedef std::vector< float > ScoreBatch
 typedef std::vectors
 
typedef std::vector< float > RotationBatch
 typedef std::vectors
 
typedef std::vector< std::vector< float > > CenterBatch
 typedef std::vectors
 
typedef std::vector< std::vector< float > > ScaleBatch
 typedef std::vectors
 
typedef std::vector< std::vector< std::vector< float > > > JointsBatch
 typedef std::vectors
 
typedef std::vector< std::vector< std::vector< float > > > JointsVisibilityBatch
 typedef std::vectors
 

Detailed Description

The AMD rocAL Types.

Enumeration Type Documentation

◆ RocalAudioBorderType

rocAL Audio Border Type enum

Enumerator
ROCAL_ZERO 

AMD ROCAL_ZERO.

ROCAL_CLAMP 

AMD ROCAL_CLAMP.

ROCAL_REFLECT 

AMD ROCAL_REFLECT.

◆ RocalDecodeDevice

rocAL Decode Device enum

Enumerator
ROCAL_HW_DECODE 

AMD ROCAL_HW_DECODE.

ROCAL_SW_DECODE 

AMD ROCAL_SW_DECODE.

◆ RocalDecoderType

rocAL Decoder Type enum

Enumerator
ROCAL_DECODER_TJPEG 

AMD ROCAL_DECODER_TJPEG.

ROCAL_DECODER_OPENCV 

AMD ROCAL_DECODER_OPENCV.

ROCAL_DECODER_HW_JPEG 

AMD ROCAL_DECODER_HW_JPEG.

ROCAL_DECODER_VIDEO_FFMPEG_SW 

AMD ROCAL_DECODER_VIDEO_FFMPEG_SW.

ROCAL_DECODER_VIDEO_FFMPEG_HW 

AMD ROCAL_DECODER_VIDEO_FFMPEG_HW.

ROCAL_DECODER_AUDIO_GENERIC 

AMD ROCAL_DECODER_AUDIO_GENERIC Uses SndFile library to read audio files.

◆ RocalExternalSourceMode

RocalExternalSourceMode struct.

Enumerator
ROCAL_EXTSOURCE_FNAME 

list of filename passed as input

ROCAL_EXTSOURCE_RAW_COMPRESSED 

compressed raw buffer passed as input

ROCAL_EXTSOURCE_RAW_UNCOMPRESSED 

uncompressed raw buffer passed as input

◆ RocalFlipAxis

rocAL Flip Axis enum

Enumerator
ROCAL_FLIP_HORIZONTAL 

AMD ROCAL_FLIP_HORIZONTAL.

ROCAL_FLIP_VERTICAL 

AMD ROCAL_FLIP_VERTICAL.

◆ RocalImageColor

rocAL Image Color enum

Enumerator
ROCAL_COLOR_RGB24 

AMD ROCAL_COLOR_RGB24.

ROCAL_COLOR_BGR24 

AMD ROCAL_COLOR_BGR24.

ROCAL_COLOR_U8 

AMD ROCAL_COLOR_U8.

ROCAL_COLOR_RGB_PLANAR 

AMD ROCAL_COLOR_RGB_PLANAR.

◆ RocalImageSizeEvaluationPolicy

rocAL Image Size Evaluation Policy enum

Enumerator
ROCAL_USE_MAX_SIZE 

AMD ROCAL_USE_MAX_SIZE.

ROCAL_USE_USER_GIVEN_SIZE 

AMD ROCAL_USE_USER_GIVEN_SIZE.

ROCAL_USE_MOST_FREQUENT_SIZE 

AMD ROCAL_USE_MOST_FREQUENT_SIZE.

ROCAL_USE_USER_GIVEN_SIZE_RESTRICTED 

Use the given size only if the actual decoded size is greater than the given size.

ROCAL_USE_MAX_SIZE_RESTRICTED 

Use max size if the actual decoded size is greater than max.

◆ RocalLastBatchPolicy

Tensor Last Batch Policies.

Enumerator
ROCAL_LAST_BATCH_FILL 

ROCAL_LAST_BATCH_FILL - The last batch is filled by either repeating the last sample or by wrapping up the data set.

ROCAL_LAST_BATCH_DROP 

ROCAL_LAST_BATCH_DROP - The last batch is dropped if there are not enough samples from the current epoch.

ROCAL_LAST_BATCH_PARTIAL 

ROCAL_LAST_BATCH_PARTIAL - The last batch is partially filled with the remaining data from the current epoch, keeping the rest of the samples empty. (currently this policy works similar to FILL in rocAL, PARTIAL policy needs to be handled from python end)

◆ RocalMelScaleFormula

rocAL MelScale formula enum

Enumerator
ROCAL_MELSCALE_SLANEY 

Slaney Follows Slaney’s MATLAB Auditory Modelling Work behavior.

ROCAL_MELSCALE_HTK 

HTK Follows O’Shaughnessy’s book formula, consistent with Hidden Markov Toolkit(HTK), m = 2595 * log10(1 + (f/700))

◆ RocalOutOfBoundsPolicy

rocAL Out Of Bounds Policy Type enum

Enumerator
ROCAL_PAD 

Pad.

ROCAL_TRIMTOSHAPE 

Trimtoshape.

ROCAL_ERROR 

Error.

◆ RocalProcessMode

rocAL Process Mode enum

Enumerator
ROCAL_PROCESS_GPU 

AMD ROCAL_PROCESS_GPU.

ROCAL_PROCESS_CPU 

AMD ROCAL_PROCESS_CPU.

◆ RocalResizeInterpolationType

rocAL Resize Interpolation Type enum

Enumerator
ROCAL_NEAREST_NEIGHBOR_INTERPOLATION 

AMD ROCAL_NEAREST_NEIGHBOR_INTERPOLATION.

ROCAL_LINEAR_INTERPOLATION 

AMD ROCAL_LINEAR_INTERPOLATION.

ROCAL_CUBIC_INTERPOLATION 

AMD ROCAL_CUBIC_INTERPOLATION.

ROCAL_LANCZOS_INTERPOLATION 

AMD ROCAL_LANCZOS_INTERPOLATION.

ROCAL_GAUSSIAN_INTERPOLATION 

AMD ROCAL_GAUSSIAN_INTERPOLATION.

ROCAL_TRIANGULAR_INTERPOLATION 

AMD ROCAL_TRIANGULAR_INTERPOLATION.

◆ RocalResizeScalingMode

rocAL Resize Scaling Mode enum

Enumerator
ROCAL_SCALING_MODE_DEFAULT 

scales wrt specified size, if only resize width/height is provided the other dimension is scaled according to aspect ratio

ROCAL_SCALING_MODE_STRETCH 

scales wrt specified size, if only resize width/height is provided the other dimension is not scaled

ROCAL_SCALING_MODE_NOT_SMALLER 

scales wrt to aspect ratio, so that resize width/height is not lesser than the specified size

ROCAL_SCALING_MODE_NOT_LARGER 

scales wrt to aspect ratio, so that resize width/height does not exceed specified size

ROCAL_SCALING_MODE_MIN_MAX 

scales wrt to aspect ratio, so that resize width/height does not exceed specified min and max size

◆ RocalROICordsType

enum RocalROICordsType
strong

Tensor ROI type.

Enumerator
ROCAL_LTRB 

ROCAL_LTRB.

ROCAL_XYWH 

ROCAL_XYWH.

◆ RocalStatus

rocAL Status enum

Enumerator
ROCAL_OK 

AMD ROCAL_OK.

ROCAL_CONTEXT_INVALID 

AMD ROCAL_CONTEXT_INVALID.

ROCAL_RUNTIME_ERROR 

AMD ROCAL_RUNTIME_ERROR.

ROCAL_UPDATE_PARAMETER_FAILED 

AMD ROCAL_UPDATE_PARAMETER_FAILED.

ROCAL_INVALID_PARAMETER_TYPE 

AMD ROCAL_INVALID_PARAMETER_TYPE.

◆ RocalTensorBackend

Tensor Backend.

Enumerator
ROCAL_CPU 

ROCAL_CPU.

ROCAL_GPU 

ROCAL_GPU.

◆ RocalTensorLayout

rocAL Tensor Layout enum

Enumerator
ROCAL_NHWC 

AMD ROCAL_NHWC.

ROCAL_NCHW 

AMD ROCAL_NCHW.

ROCAL_NFHWC 

AMD ROCAL_NFHWc.

ROCAL_NFCHW 

AMD ROCAL_NFCHW.

ROCAL_NHW 

AMD ROCAL_NHW.

ROCAL_NFT 

AMD ROCAL_NFT Spectrogram Layout FT.

ROCAL_NTF 

AMD ROCAL_NTF Spectrogram Layout TF.

ROCAL_NONE 

AMD ROCAL_NONE.

◆ RocalTensorOutputType

rocAL Tensor Output Type enum

Enumerator
ROCAL_FP32 

AMD ROCAL_FP32.

ROCAL_FP16 

AMD ROCAL_FP16.

ROCAL_UINT8 

AMD ROCAL_UINT8.

ROCAL_INT8 

AMD ROCAL_INT8.

ROCAL_UINT32 

AMD ROCAL_UINT32.

ROCAL_INT32 

AMD ROCAL_INT32.