FFTLIB User Guide
c7120/FFTLIB_types.h File Reference

Introduction

File to hold common structure, enums, macros and functions for FFTLIB.

Version
0.1 - Jan 2018 : Initial Version

Definition in file c7120/FFTLIB_types.h.

Go to the source code of this file.

Macros

#define FFTLIB_BYTE_WIDTH   64
 MMA width in bytes. More...
 
#define FFTLIB_CALC_STRIDE(BYTES, ALIGN_SHIFT)    (((((BYTES)-1) >> (ALIGN_SHIFT)) + 1) << (ALIGN_SHIFT))
 Macro function that computes the minimum stride for the specified number of bytes and alignment. More...
 
#define FFTLIB_MMA_SIZE_8_BIT_SHIFT    6
 Macro for FFTLIB shift amounts. More...
 
#define FFTLIB_MMA_SIZE_16_BIT_SHIFT    5
 Shift for MMA size when data type is 16-bit integers. More...
 
#define FFTLIB_MMA_SIZE_32_BIT_SHIFT    4
 Shift for MMA size when data type is 32-bit integers. More...
 
#define FFTLIB_MMA_SIZE_8_BIT
 MMA size as a function of precision. More...
 
#define FFTLIB_MMA_SIZE_16_BIT
 type is 16-bit integers More...
 
#define FFTLIB_MMA_SIZE_32_BIT
 type is 32-bit integers More...
 

Typedefs

typedef FFTLIB_enableDynamicRange_type_e FFTLIB_enableDynamicRange_type
 Type for enableDynamicRange variables. More...
 
typedef FFTLIB_initDynamicRange_type_e FFTLIB_initDynamicRange_type
 Type for initDynamicRange variables. More...
 
typedef FFTLIB_quantMethod_type_e FFTLIB_quantMethod_type
 Type for initDynamicRange variables. More...
 

Enumerations

enum  FFTLIB_activation_type_e {
  FFTLIB_NONE = 0 , FFTLIB_RELU , FFTLIB_SATURATION , FFTLIB_ROUNDING ,
  FFTLIB_NONE = 0 , FFTLIB_RELU , FFTLIB_SATURATION , FFTLIB_ROUNDING ,
  FFTLIB_PSAT , FFTLIB_NONE = 0 , FFTLIB_RELU , FFTLIB_SATURATION ,
  FFTLIB_ROUNDING , FFTLIB_PSAT
}
 The enumeration of possible activation operations on the computation. More...
 
enum  FFTLIB_enableDynamicRange_type_e { FFTLIB_DYNAMIC_RANGE_DISABLE = 0 , FFTLIB_DYNAMIC_RANGE_ENABLE = 1 , FFTLIB_DYNAMIC_RANGE_DISABLE = 0 , FFTLIB_DYNAMIC_RANGE_ENABLE = 1 }
 The enumeration of possible dynamic range enable settings. More...
 
enum  FFTLIB_initDynamicRange_type_e { FFTLIB_DYNAMIC_RANGE_NOINIT = 0 , FFTLIB_DYNAMIC_RANGE_INIT = 1 , FFTLIB_DYNAMIC_RANGE_NOINIT = 0 , FFTLIB_DYNAMIC_RANGE_INIT = 1 }
 The enumeration of possible dynamic range reset options. More...
 
enum  FFTLIB_quantMethod_type_e {
  FFTLIB_QUANT_PER_KERNEL = 0 , FFTLIB_QUANT_PER_CHANNEL = 1 , FFTLIB_QUANT_PER_KERNEL = 0 , FFTLIB_QUANT_PER_CHANNEL = 1 ,
  FFTLIB_QUANT_PER_KERNEL = 0 , FFTLIB_QUANT_PER_CHANNEL = 1
}
 The enumeration of possible quantization methods. More...
 

Macro Definition Documentation

◆ FFTLIB_BYTE_WIDTH

#define FFTLIB_BYTE_WIDTH   64

MMA width in bytes.

Definition at line 180 of file c7120/FFTLIB_types.h.

◆ FFTLIB_CALC_STRIDE

#define FFTLIB_CALC_STRIDE (   BYTES,
  ALIGN_SHIFT 
)     (((((BYTES)-1) >> (ALIGN_SHIFT)) + 1) << (ALIGN_SHIFT))

Macro function that computes the minimum stride for the specified number of bytes and alignment.

Definition at line 188 of file c7120/FFTLIB_types.h.

◆ FFTLIB_MMA_SIZE_8_BIT_SHIFT

#define FFTLIB_MMA_SIZE_8_BIT_SHIFT    6

Macro for FFTLIB shift amounts.

Shift for MMA size when data type is 8-bit integers

Definition at line 193 of file c7120/FFTLIB_types.h.

◆ FFTLIB_MMA_SIZE_16_BIT_SHIFT

#define FFTLIB_MMA_SIZE_16_BIT_SHIFT    5

Shift for MMA size when data type is 16-bit integers.

Definition at line 195 of file c7120/FFTLIB_types.h.

◆ FFTLIB_MMA_SIZE_32_BIT_SHIFT

#define FFTLIB_MMA_SIZE_32_BIT_SHIFT    4

Shift for MMA size when data type is 32-bit integers.

Definition at line 197 of file c7120/FFTLIB_types.h.

◆ FFTLIB_MMA_SIZE_8_BIT

#define FFTLIB_MMA_SIZE_8_BIT
Value:
((uint32_t)(((uint32_t)1) \
#define FFTLIB_MMA_SIZE_8_BIT_SHIFT
Macro for FFTLIB shift amounts.

MMA size as a function of precision.

Shift for MMA size when data type is 8-bit integers

Definition at line 204 of file c7120/FFTLIB_types.h.

◆ FFTLIB_MMA_SIZE_16_BIT

#define FFTLIB_MMA_SIZE_16_BIT
Value:
((uint32_t)(((uint32_t)1) \
#define FFTLIB_MMA_SIZE_16_BIT_SHIFT
Shift for MMA size when data type is 16-bit integers.

type is 16-bit integers

Shift for MMA size when data

Definition at line 208 of file c7120/FFTLIB_types.h.

◆ FFTLIB_MMA_SIZE_32_BIT

#define FFTLIB_MMA_SIZE_32_BIT
Value:
((int32_t)(((uint32_t)1) \
#define FFTLIB_MMA_SIZE_32_BIT_SHIFT
Shift for MMA size when data type is 32-bit integers.

type is 32-bit integers

Shift for MMA size when data

Definition at line 212 of file c7120/FFTLIB_types.h.

Typedef Documentation

◆ FFTLIB_enableDynamicRange_type

Type for enableDynamicRange variables.

Definition at line 165 of file c7120/FFTLIB_types.h.

◆ FFTLIB_initDynamicRange_type

Type for initDynamicRange variables.

Definition at line 166 of file c7120/FFTLIB_types.h.

◆ FFTLIB_quantMethod_type

Type for initDynamicRange variables.

Definition at line 173 of file c7120/FFTLIB_types.h.

Enumeration Type Documentation

◆ FFTLIB_activation_type_e

The enumeration of possible activation operations on the computation.

Enumerator
FFTLIB_NONE 

Return result as-is (allow wrapping)

FFTLIB_RELU 

Return result after applying ReLU operation.

FFTLIB_SATURATION 

Return result after saturating.

FFTLIB_ROUNDING 

Return result after rounding.

FFTLIB_NONE 

Return result as-is (allow wrapping)

FFTLIB_RELU 

Return result after applying ReLU operation.

FFTLIB_SATURATION 

Return result after saturating.

FFTLIB_ROUNDING 

Return result after rounding.

FFTLIB_PSAT 

Return result after parameterized saturation.

FFTLIB_NONE 

Return result as-is (allow wrapping)

FFTLIB_RELU 

Return result after applying ReLU operation.

FFTLIB_SATURATION 

Return result after saturating.

FFTLIB_ROUNDING 

Return result after rounding.

FFTLIB_PSAT 

Return result after parameterized saturation.

Definition at line 144 of file c7120/FFTLIB_types.h.

◆ FFTLIB_enableDynamicRange_type_e

The enumeration of possible dynamic range enable settings.

Enumerator
FFTLIB_DYNAMIC_RANGE_DISABLE 

Disable dynamic range computation.

FFTLIB_DYNAMIC_RANGE_ENABLE 

Enable dynamic range computation.

FFTLIB_DYNAMIC_RANGE_DISABLE 

Disable dynamic range computation.

FFTLIB_DYNAMIC_RANGE_ENABLE 

Enable dynamic range computation.

Definition at line 154 of file c7120/FFTLIB_types.h.

◆ FFTLIB_initDynamicRange_type_e

The enumeration of possible dynamic range reset options.

Enumerator
FFTLIB_DYNAMIC_RANGE_NOINIT 

Do not reset dynamic range min/max at start of computation.

FFTLIB_DYNAMIC_RANGE_INIT 

Reset dynamic range min/max at start of computation.

FFTLIB_DYNAMIC_RANGE_NOINIT 

Do not reset dynamic range min/max at start of computation.

FFTLIB_DYNAMIC_RANGE_INIT 

Reset dynamic range min/max at start of computation.

Definition at line 160 of file c7120/FFTLIB_types.h.

◆ FFTLIB_quantMethod_type_e

The enumeration of possible quantization methods.

Enumerator
FFTLIB_QUANT_PER_KERNEL 
FFTLIB_QUANT_PER_CHANNEL 
FFTLIB_QUANT_PER_KERNEL 
FFTLIB_QUANT_PER_CHANNEL 
FFTLIB_QUANT_PER_KERNEL 
FFTLIB_QUANT_PER_CHANNEL 

Definition at line 169 of file c7120/FFTLIB_types.h.