aboutsummaryrefslogtreecommitdiff
path: root/tests/Utils.h
diff options
context:
space:
mode:
authorRamy Elgammal <ramy.elgammal@arm.com>2022-10-23 11:44:49 +0100
committerRamy Elgammal <ramy.elgammal@arm.com>2022-11-02 18:01:26 +0000
commit73f19af80aaee8929553739894b8dd8fedb163c3 (patch)
tree3da17efcda41aa2d25b6a735f0bd0f1435bd521b /tests/Utils.h
parent01934e9953bdc0f3b931e6719241a5e415a4f2a1 (diff)
downloadComputeLibrary-73f19af80aaee8929553739894b8dd8fedb163c3.tar.gz
Add Dynamic Fusion GpuConv2d FP32/FP16 testcase
Resolves: COMPMID-5511 Signed-off-by: Ramy Elgammal <ramy.elgammal@arm.com> Change-Id: I0ac0acbf1de7da09f18f7b457307ec3cc99deb3b Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8546 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/Utils.h')
-rw-r--r--tests/Utils.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/Utils.h b/tests/Utils.h
index b62ad4a677..e58b8f7f86 100644
--- a/tests/Utils.h
+++ b/tests/Utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -48,6 +48,7 @@
#include <type_traits>
#include <vector>
+#include "arm_compute/dynamic_fusion/sketch/OperatorAttributes.h"
#include "arm_compute/runtime/CPP/CPPScheduler.h"
#include "arm_compute/runtime/RuntimeContext.h"
@@ -133,7 +134,7 @@ using make_unsigned_conditional_t = typename std::conditional<std::is_integral<T
// clang-format on
// *INDENT-ON*
-}
+} // namespace traits
/** Look up the format corresponding to a channel.
*
@@ -628,6 +629,14 @@ void set_tensor_static(TensorType &t)
{
t.info()->set_tensor_dims_state(construct_static_dims_state());
}
+
+inline experimental::dynamic_fusion::Conv2dAttributes convert_pad_stride_info_to_conv_attr(const PadStrideInfo &info, const Size2D &dialation)
+{
+ const Padding2D info_pad(info.pad_left(), info.pad_right(), info.pad_top(), info.pad_bottom());
+ const Size2D info_stride(info.stride().first, info.stride().second);
+ return arm_compute::experimental::dynamic_fusion::Conv2dAttributes().pad(info_pad).stride(info_stride).dilation(dialation);
+}
+
} // namespace test
} // namespace arm_compute
#endif /* ARM_COMPUTE_TEST_UTILS_H */