aboutsummaryrefslogtreecommitdiff
path: root/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
diff options
context:
space:
mode:
authorEren Kopuz <eren.kopuz@arm.com>2020-07-17 15:13:39 +0100
committerEren Kopuz <eren.kopuz@arm.com>2020-07-22 15:01:23 +0000
commit15205d9be0c997b900e4cef04ea359e3226d21c5 (patch)
tree466b480cbb118e0a70b740270f0b03e233f188e8 /examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
parentaa95ddc2abb7cef0b2edd03f7c4c9d9c6b9d7cf4 (diff)
downloadComputeLibrary-15205d9be0c997b900e4cef04ea359e3226d21c5.tar.gz
COMPMID-3549: GEMM Tuner - Validate input parameters
- Add validate function to kernel and exit if invalid parameters - Also relates to ticket COMPMID-3451 Change-Id: I49df7378a2fe27b8f08c45b373e13ef565a8b5d9 Signed-off-by: Eren Kopuz <eren.kopuz@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3592 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp')
-rw-r--r--examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp b/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
index 45a28abca6..f814c541c4 100644
--- a/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
+++ b/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
@@ -191,10 +191,10 @@ public:
}
// Print gemm parameters and configurations
- std::cerr << "Gemm parameters:" << std::endl;
- std::cerr << params << std::endl;
- std::cerr << "Gemm configurations:" << std::endl;
- std::cerr << configs << std::endl;
+ std::cout << "Gemm parameters:" << std::endl;
+ std::cout << params << std::endl;
+ std::cout << "Gemm configurations:" << std::endl;
+ std::cout << configs << std::endl;
CLScheduler::get().default_init(&tuner);
@@ -230,6 +230,18 @@ public:
{
arm_compute::cl_gemm::update_padding_for_cl_image(rhs_reshaped.info());
}
+
+ // Validate argments
+ Status status{};
+ status = gemm.validate((&lhs)->info(), (&rhs_reshaped)->info(), (&bias)->info(), (&dst)->info(), alpha, beta, lhs_info, rhs_info, kernel_info);
+ if(!status)
+ {
+ // Unsupported arguments
+ std::cerr << "Unsupported arguments." << std::endl;
+ std::cerr << "Check documentation for supported/unsupported combinations" << std::endl;
+ return false;
+ }
+
// Configure function
gemm.configure(&lhs, &rhs_reshaped, &bias, &dst, alpha, beta, lhs_info, rhs_info, kernel_info);