Compute Library
 21.05
CLGEMMDefaultConfigReshapedRHSOnlyBifrost Class Referencefinal

Bifrost based OpenCL GEMMReshapedOnlyRHS configuration. More...

#include <CLGEMMDefaultConfigReshapedRHSOnlyBifrost.h>

Collaboration diagram for CLGEMMDefaultConfigReshapedRHSOnlyBifrost:
[legend]

Public Member Functions

 CLGEMMDefaultConfigReshapedRHSOnlyBifrost (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 GEMMReshapedOnlyRHS configuration.

Definition at line 34 of file CLGEMMDefaultConfigReshapedRHSOnlyBifrost.h.

Constructor & Destructor Documentation

◆ CLGEMMDefaultConfigReshapedRHSOnlyBifrost()

Constructor.

Parameters
[in]gpuGPU target

Definition at line 42 of file CLGEMMDefaultConfigReshapedRHSOnlyBifrost.cpp.

44 {
45 }
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 47 of file CLGEMMDefaultConfigReshapedRHSOnlyBifrost.cpp.

48 {
49  using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigReshapedRHSOnlyBifrost::*)(unsigned int m, unsigned int n, unsigned int k,
50  unsigned int b);
51 
52  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G51(&CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_f32,
53  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_f16,
54  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_u8);
55 
56  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G52(&CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G52_f32,
57  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G52_f16,
58  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8);
59 
60  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G76(&CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_f32,
61  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_f16,
62  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_u8);
63 
64  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G7x(&CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_f32,
65  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_f16,
66  &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8);
67 
68  ConfigurationFunctionExecutorPtr func = nullptr;
69 
70  switch(_target)
71  {
72  case GPUTarget::G76:
73  func = configs_G76.get_function(data_type);
74  break;
75  case GPUTarget::G51:
76  func = configs_G51.get_function(data_type);
77  break;
78  case GPUTarget::G52:
79  func = configs_G52.get_function(data_type);
80  break;
81  default:
82  func = configs_G7x.get_function(data_type);
83  break;
84  }
85 
86  ARM_COMPUTE_ERROR_ON_MSG(func == nullptr, "Data type not support for GEMM");
87  return (this->*func)(m, n, k, b);
88 }
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::G51, arm_compute::G52, arm_compute::G76, and CLGEMMConfigArray< T >::get_function().


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