Compute Library
 21.05
CLGEMMConfigArray< T > Class Template Reference

Basic container for the OpenCL GEMM configuration functions. More...

#include <ICLGEMMKernelConfiguration.h>

Public Member Functions

 CLGEMMConfigArray (T func_f32, T func_f16, T func_int8)
 Constructor. More...
 
get_function (DataType data_type)
 Method to return the GEMM configuration function based on data type. More...
 

Static Public Attributes

static constexpr size_t DT_F32 = 0
 Alias for F32 index. More...
 
static constexpr size_t DT_F16 = 1
 Alias for F16 index. More...
 
static constexpr size_t DT_INT8 = 2
 Alias for Int8 index. More...
 

Detailed Description

template<class T>
class arm_compute::CLGEMMConfigArray< T >

Basic container for the OpenCL GEMM configuration functions.

Definition at line 35 of file ICLGEMMKernelConfiguration.h.

Constructor & Destructor Documentation

◆ CLGEMMConfigArray()

CLGEMMConfigArray ( func_f32,
func_f16,
func_int8 
)
inline

Constructor.

Parameters
[in]func_f32Function to call for GEMM F32
[in]func_f16Function to call for GEMM F16
[in]func_int8Function to call for GEMM Int8 (QASYMM8, QASYMM8_SIGNED, QSYMM8_PER_CHANNEL)

Definition at line 52 of file ICLGEMMKernelConfiguration.h.

53  : _configs{ func_f32, func_f16, func_int8 }
54  {
55  }

Member Function Documentation

◆ get_function()

T get_function ( DataType  data_type)
inline

Method to return the GEMM configuration function based on data type.

Parameters
[in]data_typeInput data type
Returns
the valid function otherwise it returns nullptr if the data type is not valid

Definition at line 63 of file ICLGEMMKernelConfiguration.h.

64  {
65  switch(data_type)
66  {
67  case DataType::F32:
68  return _configs.at(DT_F32);
69  case DataType::F16:
70  return _configs.at(DT_F16);
71  case DataType::QASYMM8:
74  return _configs.at(DT_INT8);
75  default:
76  return nullptr;
77  }
78  }
static constexpr size_t DT_INT8
Alias for Int8 index.
static constexpr size_t DT_F32
Alias for F32 index.
1 channel, 1 F32 per channel
static constexpr size_t DT_F16
Alias for F16 index.
1 channel, 1 F16 per channel
const DataType data_type
Definition: Im2Col.cpp:150
quantized, asymmetric fixed-point 8-bit number unsigned
quantized, symmetric per channel fixed-point 8-bit number
quantized, asymmetric fixed-point 8-bit number signed

References arm_compute::test::validation::data_type, CLGEMMConfigArray< T >::DT_F16, CLGEMMConfigArray< T >::DT_F32, CLGEMMConfigArray< T >::DT_INT8, arm_compute::F16, arm_compute::F32, arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, and arm_compute::QSYMM8_PER_CHANNEL.

Referenced by CLGEMMDefaultConfigNativeBifrost::configure(), CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure(), CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure(), CLGEMMDefaultConfigReshapedValhall::configure(), CLGEMMDefaultConfigReshapedBifrost::configure(), CLGEMMDefaultConfigNativeValhall::configure(), and CLGEMMDefaultConfigNativeMidgard::configure().

Field Documentation

◆ DT_F16

constexpr size_t DT_F16 = 1
static

Alias for F16 index.

Definition at line 41 of file ICLGEMMKernelConfiguration.h.

Referenced by CLGEMMConfigArray< T >::get_function().

◆ DT_F32

constexpr size_t DT_F32 = 0
static

Alias for F32 index.

Definition at line 39 of file ICLGEMMKernelConfiguration.h.

Referenced by CLGEMMConfigArray< T >::get_function().

◆ DT_INT8

constexpr size_t DT_INT8 = 2
static

Alias for Int8 index.

Definition at line 43 of file ICLGEMMKernelConfiguration.h.

Referenced by CLGEMMConfigArray< T >::get_function().


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