21.05
|
Namespaces | |
auto_heuristics | |
Data Structures | |
class | CLGEMMDefaultConfigNativeBifrost |
Bifrost based OpenCL GEMMNative configuration. More... | |
class | CLGEMMDefaultConfigNativeMidgard |
Midgard based OpenCL GEMMNative configuration. More... | |
class | CLGEMMDefaultConfigNativeValhall |
Valhall based OpenCL GEMMNative configuration. More... | |
class | CLGEMMDefaultConfigReshapedBifrost |
Bifrost based OpenCL GEMMReshaped configuration. More... | |
class | CLGEMMDefaultConfigReshapedRHSOnlyBifrost |
Bifrost based OpenCL GEMMReshapedOnlyRHS configuration. More... | |
class | CLGEMMDefaultConfigReshapedRHSOnlyValhall |
Valhall based OpenCL GEMMReshapedOnlyRHS configuration. More... | |
class | CLGEMMDefaultConfigReshapedValhall |
Valhall based OpenCL GEMMReshaped configuration. More... | |
class | CLGEMMDefaultTypeBifrost |
Bifrost based OpenCL GEMMKernel selection. More... | |
class | CLGEMMDefaultTypeMidgard |
Midgard based OpenCL GEMMKernel selection. More... | |
class | CLGEMMDefaultTypeValhall |
Valhall based OpenCL GEMMKernel selection. More... | |
class | CLGEMMKernelSelectionFactory |
CLGEMMKernelSelection factory class. More... | |
class | CLGEMMNativeKernelConfigurationFactory |
CLGEMMNative factory class. More... | |
class | CLGEMMReshapedKernelConfigurationFactory |
CLGEMMReshaped factory class. More... | |
class | CLGEMMReshapedOnlyRHSKernelConfigurationFactory |
CLGEMMReshapedOnlyRHS factory class. More... | |
class | ICLGEMMKernelSelection |
Basic interface for the GEMM kernel selection. More... | |
Functions | |
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > | configure_lhs_rhs_info (unsigned int m, unsigned int n, unsigned int m0, unsigned int n0, unsigned int k0, unsigned int v0, unsigned int h0, bool lhs_interleave, bool rhs_interleave, bool lhs_transpose, bool rhs_transpose, bool export_to_cl_image=false) |
Configure GEMMLHSMatrixInfo and GEMMRHSMatrixInfo. More... | |
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > | select_lhs_rhs_info (std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > info_img, std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > info_buf, unsigned int n, unsigned int k, unsigned int b, DataType data_type) |
Select GEMMLHSMatrixInfo and GEMMRHSMatrixInfo. More... | |
void | update_padding_for_cl_image (ITensorInfo *tensor) |
Update padding required to export the OpenCL buffer to OpenCL image2d. More... | |
Status | validate_image2d_support_on_rhs (const ITensorInfo &tensor_reshaped_info, const GEMMRHSMatrixInfo &rhs_info) |
Utility function to validate the image2d OpenCL object support on the RHS reshaped matrix. More... | |
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > configure_lhs_rhs_info | ( | unsigned int | m, |
unsigned int | n, | ||
unsigned int | m0, | ||
unsigned int | n0, | ||
unsigned int | k0, | ||
unsigned int | v0, | ||
unsigned int | h0, | ||
bool | lhs_interleave, | ||
bool | rhs_interleave, | ||
bool | lhs_transpose, | ||
bool | rhs_transpose, | ||
bool | export_to_cl_image = false |
||
) |
Configure GEMMLHSMatrixInfo and GEMMRHSMatrixInfo.
[in] | m | Number of rows (M) in the LHS matrix not reshaped |
[in] | n | Number of columns (N) in the RHS matrix not reshaped |
[in] | m0 | Number of rows processed by each thread/work-item |
[in] | n0 | Number of columns processed by each thread/work-item |
[in] | k0 | Number of inner accumulation performed by each thread/work-item |
[in] | v0 | Number of vertical blocks of size (m0xk0) stored on the same output row |
[in] | h0 | Number of horizontal blocks of size (k0xn0) stored on the same output row |
[in] | lhs_interleave | True if the v0 (m0xk0) blocks have to be interleaved in the output row |
[in] | rhs_interleave | True if the h0 (k0xn0) blocks have to be interleaved in the output row |
[in] | lhs_transpose | True if the (m0xk0) block has to be transposed before been stored |
[in] | rhs_transpose | True if the (k0xn0) block has to be transposed before been stored |
[in] | export_to_cl_image | (Optional) True if the RHS reshaped matrix has to be exported to cl_image |
Definition at line 40 of file CLGEMMHelpers.cpp.
References ARM_COMPUTE_ERROR_ON.
Referenced by arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_config_native(), arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_config_reshaped(), and arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_config_reshaped_only_rhs().
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > select_lhs_rhs_info | ( | std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > | info_img, |
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > | info_buf, | ||
unsigned int | n, | ||
unsigned int | k, | ||
unsigned int | b, | ||
DataType | data_type | ||
) |
Select GEMMLHSMatrixInfo and GEMMRHSMatrixInfo.
This function accepts two pairs of GEMMLHSMatrixInfo/GEMMRHSMatrixInfo where only the first is with cl_image2d support, and selects the valid one validating the GEMMRHSMatrixInfo. If the validation passes, the functions will return the first GEMMLHSMatrixInfo/GEMMRHSMatrixInfo pair with cl_image2d support.
[in] | info_img | GEMMLHSMatrixInfo/GEMMRHSMatrixInfo with cl_image2d support |
[in] | info_buf | GEMMLHSMatrixInfo/GEMMRHSMatrixInfo to fall-back if cl_image2d cannot be used |
[in] | n | Number of columns (N) in the RHS matrix not reshaped |
[in] | k | Number of rows (K) in the RHS matrix not reshaped |
[in] | b | Batch size |
[in] | data_type | Data type |
Definition at line 53 of file CLGEMMHelpers.cpp.
References arm_compute::test::validation::b, arm_compute::misc::shape_calculator::compute_rhs_reshaped_shape(), arm_compute::test::validation::data_type, arm_compute::test::validation::shape, and validate_image2d_support_on_rhs().
void update_padding_for_cl_image | ( | ITensorInfo * | tensor | ) |
Update padding required to export the OpenCL buffer to OpenCL image2d.
[in,out] | tensor | ITensorInfo of the tensor required to be exported to OpenCL image2d |
Definition at line 71 of file CLGEMMHelpers.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, ITensorInfo::element_size(), ITensorInfo::extend_padding(), CLKernelLibrary::get(), arm_compute::get_cl_image_pitch_alignment(), and ITensorInfo::strides_in_bytes().
Referenced by ClDirectConvolutionKernel::configure().
Status validate_image2d_support_on_rhs | ( | const ITensorInfo & | tensor_reshaped_info, |
const GEMMRHSMatrixInfo & | rhs_info | ||
) |
Utility function to validate the image2d OpenCL object support on the RHS reshaped matrix.
[in] | tensor_reshaped_info | TensorInfo for the RHS reshaped matrix |
[in] | rhs_info | GEMMRHSMatrixInfo |
Definition at line 91 of file CLGEMMHelpers.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_MSG, GEMMRHSMatrixInfo::export_to_cl_image, arm_compute::F16, arm_compute::F32, CLKernelLibrary::get(), arm_compute::get_cl_image_pitch_alignment(), CLKernelLibrary::get_device(), arm_compute::image2d_from_buffer_supported(), GEMMRHSMatrixInfo::k0, GEMMRHSMatrixInfo::n0, and ITensorInfo::tensor_shape().
Referenced by select_lhs_rhs_info().