35 #include "tests/datasets/ShapeDatasets.h" 40 #include "tests/validation/fixtures/GEMMFixture.h" 62 using CLGEMMMatrixMultiplyReshapedFixture = GEMMMatrixMultiplyReshapedValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped>;
67 GEMMMatrixMultiplyReshapedValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped, true>;
71 using CLGEMMMatrixMultiplyReshaped3DFixture = GEMMMatrixMultiplyReshaped3DValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped>;
76 GEMMMatrixMultiplyReshaped3DValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped, true>;
86 constexpr
float abs_tolerance_f16_mixed_precision(0.01f);
89 constexpr
float abs_tolerance_f16(0.01f);
329 input0_info ,input1_info, input2_info,
output_info, lhs_info, rhs_info, gemm_info,
expected)
332 &input1_info.clone()->set_is_resizable(
true),
333 &input2_info.clone()->set_is_resizable(
true),
334 &output_info.clone()->set_is_resizable(
true),1.f,1.f,
348 m0_values_precommit),
349 n0_values_precommit),
350 k0_values_precommit),
351 v0_values_precommit),
352 h0_values_precommit),
355 framework::dataset::
make("export_to_cl_image_rhs", false)),
358 beta_values_precommit),
359 broadcast_bias_values),
360 lhs_transpose_values),
383 beta_values_nightly),
384 broadcast_bias_values),
385 lhs_transpose_values),
399 m0_values_precommit),
400 n0_values_precommit),
401 k0_values_precommit),
402 v0_values_precommit),
403 h0_values_precommit),
409 beta_values_precommit),
410 lhs_transpose_values),
434 beta_values_nightly),
435 lhs_transpose_values),
564 input0_info ,input1_info, input2_info,
output_info, lhs_info, rhs_info, gemm_info,
expected)
567 &input1_info.clone()->set_is_resizable(
true),
568 &input2_info.clone()->set_is_resizable(
true),
569 &output_info.clone()->set_is_resizable(
true),1.f,1.f,
581 m0_values_precommit),
582 n0_values_precommit),
583 k0_values_precommit),
584 v0_values_precommit),
585 h0_values_precommit),
591 beta_values_precommit),
592 broadcast_bias_values),
593 lhs_transpose_values),
616 n0_export_to_cl_image_values_nightly),
617 k0_export_to_cl_image_values_nightly),
625 beta_values_nightly),
626 broadcast_bias_values),
627 lhs_transpose_values),
649 m0_values_precommit),
650 n0_values_precommit),
651 k0_values_precommit),
652 v0_values_precommit),
653 h0_values_precommit),
659 beta_values_precommit),
660 lhs_transpose_values),
683 n0_export_to_cl_image_values_nightly),
684 k0_export_to_cl_image_values_nightly),
692 beta_values_nightly),
693 lhs_transpose_values),
718 m0_values_precommit),
719 n0_values_precommit),
720 k0_values_precommit),
721 v0_values_precommit),
722 h0_values_precommit),
728 beta_values_precommit),
729 broadcast_bias_values),
730 lhs_transpose_values),
753 beta_values_nightly),
754 broadcast_bias_values),
755 lhs_transpose_values),
769 m0_values_precommit),
770 n0_values_precommit),
771 k0_values_precommit),
772 v0_values_precommit),
773 h0_values_precommit),
779 beta_values_precommit),
780 lhs_transpose_values),
804 beta_values_nightly),
805 lhs_transpose_values),
935 input0_info ,input1_info, input2_info,
output_info, lhs_info, rhs_info, gemm_info,
expected)
938 &input1_info.clone()->set_is_resizable(
true),
939 &input2_info.clone()->set_is_resizable(
true),
940 &output_info.clone()->set_is_resizable(
true),1.f,1.f,
952 m0_values_precommit),
953 n0_values_precommit),
954 k0_values_precommit),
955 v0_values_precommit),
956 h0_values_precommit),
962 beta_values_precommit),
963 broadcast_bias_values),
964 lhs_transpose_values),
987 n0_export_to_cl_image_values_nightly),
988 k0_export_to_cl_image_values_nightly),
996 beta_values_nightly),
997 broadcast_bias_values),
998 lhs_transpose_values),
1004 validate(
CLAccessor(_target), _reference, rel_tolerance_f16, 0.f, abs_tolerance_f16);
1020 m0_values_precommit),
1021 n0_values_precommit),
1022 k0_values_precommit),
1023 v0_values_precommit),
1024 h0_values_precommit),
1029 a_values_precommit),
1030 beta_values_precommit),
1031 lhs_transpose_values),
1037 validate(
CLAccessor(_target), _reference, rel_tolerance_f16, 0.f, abs_tolerance_f16);
1054 n0_export_to_cl_image_values_nightly),
1055 k0_export_to_cl_image_values_nightly),
1063 beta_values_nightly),
1064 lhs_transpose_values),
1070 validate(
CLAccessor(_target), _reference, rel_tolerance_f16, 0.f, abs_tolerance_f16);
1089 m0_values_precommit),
1090 n0_values_precommit),
1091 k0_values_precommit),
1092 v0_values_precommit),
1093 h0_values_precommit),
1096 framework::dataset::
make("export_to_cl_image_rhs", false)),
1098 a_values_precommit),
1099 beta_values_precommit),
1100 broadcast_bias_values),
1101 lhs_transpose_values),
1105 validate(
CLAccessor(_target), _reference, rel_tolerance_f16_mixed_precision, 0.f, abs_tolerance_f16_mixed_precision);
1124 beta_values_nightly),
1125 broadcast_bias_values),
1126 lhs_transpose_values),
1130 validate(
CLAccessor(_target), _reference, rel_tolerance_f16_mixed_precision, 0.f, abs_tolerance_f16_mixed_precision);
1140 m0_values_precommit),
1141 n0_values_precommit),
1142 k0_values_precommit),
1143 v0_values_precommit),
1144 h0_values_precommit),
1149 a_values_precommit),
1150 beta_values_precommit),
1151 lhs_transpose_values),
1155 validate(
CLAccessor(_target), _reference, rel_tolerance_f16_mixed_precision, 0.f, abs_tolerance_f16_mixed_precision);
1175 beta_values_nightly),
1176 lhs_transpose_values),
1180 validate(
CLAccessor(_target), _reference, rel_tolerance_f16_mixed_precision, 0.f, abs_tolerance_f16_mixed_precision);
bool image2d_from_buffer_supported(const cl::Device &device)
Helper function to check whether the cl_khr_image2d_from_buffer extension is supported.
Descriptor used by the GEMM kernels.
GEMMMatrixMultiplyInterleavedTransposed3DValidationFixture< CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped > CLGEMMMatrixMultiplyReshaped3DFixture
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
ARM_COMPUTE_EXPECT(has_error==expected, framework::LogLevel::ERRORS)
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
GEMM LHS (Left Hand Side) matrix information.
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
Activation Layer Information class.
#define ARM_COMPUTE_TEST_INFO(INFO)
Copyright (c) 2017-2021 Arm Limited.
GEMMMatrixMultiplyReshapedValidationFixture< CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped, true > CLGEMMMatrixMultiplyReshapedMixedPrecisionFixture
1 channel, 1 F16 per channel
CLSynthetizeOperator< opencl::kernels::ClGemmReshapeRhsMatrixKernel > CLGEMMReshapeRHSMatrix
static Status validate(const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *src2, const ITensorInfo *dst, float alpha, float beta, const GEMMLHSMatrixInfo &lhs_info, const GEMMRHSMatrixInfo &rhs_info, const GEMMKernelInfo &gemm_info)
Static function to check if given info will lead to a valid configuration.
DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), })), framework::dataset::make("ActivationInfo", { ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SQRT), })), framework::dataset::make("Expected", { false, true, true, true, false, false, true, true, false })), input_info, output_info, act_info, expected)
DatasetMode
Possible dataset modes.
GEMMMatrixMultiplyReshaped3DValidationFixture< CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped, true > CLGEMMMatrixMultiplyReshaped3DMixedPrecisionFixture
GEMM RHS (Right Hand Side) matrix information.
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
quantized, asymmetric fixed-point 8-bit number unsigned
Accessor implementation for CLTensor objects.
TEST_SUITE(U8_to_S8) FIXTURE_DATA_TEST_CASE(RunSmall
validate(CLAccessor(output_state), expected_output)
void ARM_COMPUTE_PRINT_INFO()
Lower and Upper Bounded Rectifier ( )
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F16)))
Class reprensenting a relative tolerance value.
GEMMMatrixMultiplyInterleavedTransposedValidationFixture< CLTensor, CLAccessor, T, CLGEMMReshapeLHSMatrix, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshaped > CLGEMMMatrixMultiplyReshapedFixture
Store the tensor's metadata.
zip(zip(framework::dataset::make("Weights", { TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 1U), 1, DataType::F32), }), framework::dataset::make("MVBGInfo",{ TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::F16), TensorInfo(TensorShape(5U), 1, DataType::F32), })), framework::dataset::make("Expected", { true, false, false}))
DataType
Available data types.
constexpr float abs_tolerance_f32(0.0001f)
F32 Absolute tolerance value for comparing reference's output against implementation's output for flo...
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))