From 81f796b1d49d737d5f24fdc83397dbdbd1fac7d7 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Fri, 23 Dec 2022 14:42:55 +0000 Subject: Fix various compilation errors Partially resolves: COMPMID-5794 Signed-off-by: Viet-Hoa Do Change-Id: I275d0401be978e86507990bdb7dc5b1538a108d8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8884 Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- .../sketch/gpu/operators/internal/GpuElementwiseBinaryCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dynamic_fusion/sketch/gpu/operators/internal/GpuElementwiseBinaryCommon.cpp') diff --git a/src/dynamic_fusion/sketch/gpu/operators/internal/GpuElementwiseBinaryCommon.cpp b/src/dynamic_fusion/sketch/gpu/operators/internal/GpuElementwiseBinaryCommon.cpp index 073924947c..aec22e100c 100644 --- a/src/dynamic_fusion/sketch/gpu/operators/internal/GpuElementwiseBinaryCommon.cpp +++ b/src/dynamic_fusion/sketch/gpu/operators/internal/GpuElementwiseBinaryCommon.cpp @@ -74,6 +74,7 @@ Status GpuElementwiseBinaryCommon::is_supported_op(const GpuWorkloadContext { const auto cl_compile_ctx = context.cl_compile_context(); ARM_COMPUTE_RETURN_ERROR_ON(cl_compile_ctx == nullptr); + // Validate ElementwiseBinary Component { ArgumentPack arguments; @@ -149,8 +150,7 @@ void GpuElementwiseBinaryCommon::create_op(GpuWorkloadSketch if(sketch_ctx->gpu_language() == GpuLanguage::OpenCL) { - const auto cl_compile_ctx = sketch_ctx->cl_compile_context(); - ARM_COMPUTE_ERROR_ON(cl_compile_ctx == nullptr); + ARM_COMPUTE_ERROR_ON_NULLPTR(sketch_ctx->cl_compile_context()); // Add ElementwiseBinary Component { -- cgit v1.2.1