Compute Library
 21.05
CLGEMMDefaultConfigNativeBifrost Class Referencefinal

Bifrost based OpenCL GEMMNative configuration. More...

#include <CLGEMMDefaultConfigNativeBifrost.h>

Collaboration diagram for CLGEMMDefaultConfigNativeBifrost:
[legend]

Public Member Functions

 CLGEMMDefaultConfigNativeBifrost (GPUTarget gpu)
 Constructor. More...
 
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfoconfigure (unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override
 Given M, N, K and B, this method returns the GEMMLHSMatrixInfo and GEMMRHSMatrixInfo to be used. More...
 
- Public Member Functions inherited from ICLGEMMKernelConfiguration
 ICLGEMMKernelConfiguration (GPUTarget arch)
 Constructor. More...
 
 ICLGEMMKernelConfiguration (const ICLGEMMKernelConfiguration &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLGEMMKernelConfigurationoperator= (const ICLGEMMKernelConfiguration &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLGEMMKernelConfiguration (ICLGEMMKernelConfiguration &&)=default
 Default Move Constructor. More...
 
ICLGEMMKernelConfigurationoperator= (ICLGEMMKernelConfiguration &&)=default
 Default move assignment operator. More...
 
virtual ~ICLGEMMKernelConfiguration ()=default
 Virtual destructor. More...
 

Detailed Description

Bifrost based OpenCL GEMMNative configuration.

Definition at line 34 of file CLGEMMDefaultConfigNativeBifrost.h.

Constructor & Destructor Documentation

◆ CLGEMMDefaultConfigNativeBifrost()

Constructor.

Parameters
[in]gpuGPU target

Definition at line 37 of file CLGEMMDefaultConfigNativeBifrost.cpp.

39 {
40 }
ICLGEMMKernelConfiguration(GPUTarget arch)
Constructor.

Member Function Documentation

◆ configure()

std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > configure ( unsigned int  m,
unsigned int  n,
unsigned int  k,
unsigned int  b,
DataType  data_type 
)
overridevirtual

Given M, N, K and B, this method returns the GEMMLHSMatrixInfo and GEMMRHSMatrixInfo to be used.

Parameters
[in]mNumber of rows LHS matrix
[in]nNumber of columns RHS matrix
[in]kNumber of columns LHS matrix or number of rows RHS matrix
[in]bBatch size
[in]data_typeData type

Implements ICLGEMMKernelConfiguration.

Definition at line 42 of file CLGEMMDefaultConfigNativeBifrost.cpp.

43 {
44  using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigNativeBifrost::*)(unsigned int m, unsigned int n, unsigned int k,
45  unsigned int b);
46 
47  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G71(&CLGEMMDefaultConfigNativeBifrost::configure_G71_f32,
48  &CLGEMMDefaultConfigNativeBifrost::configure_G71_f32, // We use the F32 heuristic
49  &CLGEMMDefaultConfigNativeBifrost::configure_G71_u8);
50 
51  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G76(&CLGEMMDefaultConfigNativeBifrost::configure_G76_f32,
52  &CLGEMMDefaultConfigNativeBifrost::configure_G76_f32, // We use the F32 heuristic
53  &CLGEMMDefaultConfigNativeBifrost::configure_G76_u8);
54 
55  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G7x(&CLGEMMDefaultConfigNativeBifrost::configure_default_f32,
56  &CLGEMMDefaultConfigNativeBifrost::configure_default_f32, // We use the F32 heuristic
57  &CLGEMMDefaultConfigNativeBifrost::configure_default_u8);
58 
59  ConfigurationFunctionExecutorPtr func = nullptr;
60 
61  switch(_target)
62  {
63  case GPUTarget::G76:
64  func = configs_G76.get_function(data_type);
65  break;
66  case GPUTarget::G71:
67  func = configs_G71.get_function(data_type);
68  break;
69  default:
70  func = configs_G7x.get_function(data_type);
71  break;
72  }
73 
74  ARM_COMPUTE_ERROR_ON_MSG(func == nullptr, "Data type not support for GEMM");
75  return (this->*func)(m, n, k, b);
76 }
SimpleTensor< float > b
Definition: DFT.cpp:157
const DataType data_type
Definition: Im2Col.cpp:150
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Definition: Error.h:456
FloorUKernelPtr func

References ARM_COMPUTE_ERROR_ON_MSG, arm_compute::test::validation::b, arm_compute::test::validation::data_type, func, arm_compute::G71, arm_compute::G76, and CLGEMMConfigArray< T >::get_function().


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