Compute Library
 21.05
CLGEMMDefaultConfigReshapedValhall Class Referencefinal

Valhall based OpenCL GEMMReshaped configuration. More...

#include <CLGEMMDefaultConfigReshapedValhall.h>

Collaboration diagram for CLGEMMDefaultConfigReshapedValhall:
[legend]

Public Member Functions

 CLGEMMDefaultConfigReshapedValhall (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

Valhall based OpenCL GEMMReshaped configuration.

Definition at line 34 of file CLGEMMDefaultConfigReshapedValhall.h.

Constructor & Destructor Documentation

◆ CLGEMMDefaultConfigReshapedValhall()

Constructor.

Parameters
[in]gpuGPU target

Definition at line 37 of file CLGEMMDefaultConfigReshapedValhall.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 CLGEMMDefaultConfigReshapedValhall.cpp.

43 {
44  using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigReshapedValhall::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b);
45 
46  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G77(&CLGEMMDefaultConfigReshapedValhall::configure_G77_f32,
47  &CLGEMMDefaultConfigReshapedValhall::configure_G77_f16,
48  &CLGEMMDefaultConfigReshapedValhall::configure_G77_u8);
49 
50  CLGEMMConfigArray<ConfigurationFunctionExecutorPtr> configs_G78(&CLGEMMDefaultConfigReshapedValhall::configure_G78_f32,
51  &CLGEMMDefaultConfigReshapedValhall::configure_G78_f16,
52  &CLGEMMDefaultConfigReshapedValhall::configure_G77_u8);
53 
54  ConfigurationFunctionExecutorPtr func = nullptr;
55 
56  switch(_target)
57  {
58  case GPUTarget::G78:
59  func = configs_G78.get_function(data_type);
60  break;
61  case GPUTarget::G77:
62  default:
63  func = configs_G77.get_function(data_type);
64  break;
65  }
66 
67  ARM_COMPUTE_ERROR_ON_MSG(func == nullptr, "Data type not support for GEMM");
68  return (this->*func)(m, n, k, b);
69 }
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::G77, arm_compute::G78, and CLGEMMConfigArray< T >::get_function().


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