diff options
author | SiCongLi <sicong.li@arm.com> | 2021-06-29 13:18:30 +0100 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2021-07-02 12:05:37 +0000 |
commit | bc4e31113be0af320f44b338969d6972b64ca4de (patch) | |
tree | 21e44fad55a80794a9609e847188764cf42f13d7 /tests/validation/CL/DepthwiseConvolutionLayer.cpp | |
parent | 66831659fdef07c428993dccfa5d92416bae1ef9 (diff) | |
download | ComputeLibrary-bc4e31113be0af320f44b338969d6972b64ca4de.tar.gz |
Implement FP GPU depthwise convolution 1x1 kernel for in-place computation
* Implement in-place graph node mutator for 1x1 depthwise convolution
* Add in-place to validation fixture except for
DepthwiseConvolutionLayerNativeValidationFixture as it would be a
duplicate test otherwise (DepthwiseConvolutionLayerNative test tests
the underlying kernel)
Resolves: COMPMID-4432
Change-Id: Id7f10f5ebdce7d49f550c0b62dbaaab7f5b59d29
Signed-off-by: SiCongLi <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5874
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/validation/CL/DepthwiseConvolutionLayer.cpp')
-rw-r--r-- | tests/validation/CL/DepthwiseConvolutionLayer.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/validation/CL/DepthwiseConvolutionLayer.cpp b/tests/validation/CL/DepthwiseConvolutionLayer.cpp index c88f7c1624..22922f41a2 100644 --- a/tests/validation/CL/DepthwiseConvolutionLayer.cpp +++ b/tests/validation/CL/DepthwiseConvolutionLayer.cpp @@ -156,6 +156,8 @@ template <typename T> using CLDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>; template <typename T> using CLDepthwiseConvolutionLayerMixedDataLayoutFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, true>; +template <typename T> +using CLDepthwiseConvolutionLayerInPlaceFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, false, true>; TEST_SUITE(Float) TEST_SUITE(FP16) @@ -290,6 +292,19 @@ FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, f } TEST_SUITE_END() // Dilation TEST_SUITE_END() // Generic + +TEST_SUITE(InPlace) +FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerInPlaceFixture<half>, framework::DatasetMode::ALL, + combine(combine(combine(combine(datasets::SmallInPlaceDepthwiseConvolutionLayerDataset(), + framework::dataset::make("DepthMultiplier", { 1 })), + framework::dataset::make("DataType", + DataType::F16)), + framework::dataset::make("DataLayout", { DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_src), _reference, tolerance_f16, tolerance_num); +} +TEST_SUITE_END() // InPlace TEST_SUITE_END() // FP16 TEST_SUITE(FP32) @@ -355,7 +370,7 @@ FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout, CLDepthwiseConvolutionLayerMixedD framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("DataLayout", DataLayout::NHWC)), - framework::dataset::make("ActivationInfo", ActivationLayerInfo()))) + framework::dataset::make("ActivationInfo", ActivationLayerInfo()))) { validate(CLAccessor(_target), _reference, tolerance_f32); } @@ -436,6 +451,19 @@ FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, } TEST_SUITE_END() // Dilation TEST_SUITE_END() // Generic + +TEST_SUITE(InPlace) +FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerInPlaceFixture<float>, framework::DatasetMode::ALL, + combine(combine(combine(combine(datasets::SmallInPlaceDepthwiseConvolutionLayerDataset(), + framework::dataset::make("DepthMultiplier", { 1 })), + framework::dataset::make("DataType", + DataType::F32)), + framework::dataset::make("DataLayout", { DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_src), _reference, tolerance_f32); +} +TEST_SUITE_END() // InPlace TEST_SUITE_END() // FP32 TEST_SUITE_END() // Float |