diff options
7 files changed, 24 insertions, 24 deletions
diff --git a/src/dynamic_fusion/sketch/gpu/operators/GpuConv2d.cpp b/src/dynamic_fusion/sketch/gpu/operators/GpuConv2d.cpp index e00f09563f..d29d84844e 100644 --- a/src/dynamic_fusion/sketch/gpu/operators/GpuConv2d.cpp +++ b/src/dynamic_fusion/sketch/gpu/operators/GpuConv2d.cpp @@ -204,12 +204,13 @@ ITensorInfo *GpuConv2d::create_op(GpuWorkloadSketch &sketch, const auto sketch_ctx = sketch.implementation().context(); - const auto gpu_target = sketch_ctx->gpu_target(); + const auto gpu_target = sketch_ctx->gpu_target(); 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_UNUSED(cl_compile_ctx); // Add Direct Conv2d Component { diff --git a/src/dynamic_fusion/sketch/gpu/operators/GpuPool2d.cpp b/src/dynamic_fusion/sketch/gpu/operators/GpuPool2d.cpp index c602f45164..e464be8607 100644 --- a/src/dynamic_fusion/sketch/gpu/operators/GpuPool2d.cpp +++ b/src/dynamic_fusion/sketch/gpu/operators/GpuPool2d.cpp @@ -169,6 +169,7 @@ void GpuPool2d::create_op(GpuWorkloadSketch &sketch, if(sketch_ctx->gpu_language() == GpuLanguage::OpenCL) { const auto cl_compile_ctx = sketch_ctx->cl_compile_context(); + ARM_COMPUTE_UNUSED(cl_compile_ctx); ARM_COMPUTE_ERROR_ON(cl_compile_ctx == nullptr); // Add Component diff --git a/src/dynamic_fusion/sketch/gpu/operators/GpuReshape.cpp b/src/dynamic_fusion/sketch/gpu/operators/GpuReshape.cpp index f5645f325f..0f43a578df 100644 --- a/src/dynamic_fusion/sketch/gpu/operators/GpuReshape.cpp +++ b/src/dynamic_fusion/sketch/gpu/operators/GpuReshape.cpp @@ -130,6 +130,7 @@ ITensorInfo *GpuReshape::create_op(GpuWorkloadSketch &sketch, if(sketch_ctx->gpu_language() == GpuLanguage::OpenCL) { const auto cl_compile_ctx = sketch_ctx->cl_compile_context(); + ARM_COMPUTE_UNUSED(cl_compile_ctx); ARM_COMPUTE_ERROR_ON(cl_compile_ctx == nullptr); // Add ElementwiseBinary Component diff --git a/src/dynamic_fusion/sketch/gpu/operators/GpuSoftmax.cpp b/src/dynamic_fusion/sketch/gpu/operators/GpuSoftmax.cpp index db74538f91..291a1e5bda 100644 --- a/src/dynamic_fusion/sketch/gpu/operators/GpuSoftmax.cpp +++ b/src/dynamic_fusion/sketch/gpu/operators/GpuSoftmax.cpp @@ -154,6 +154,7 @@ void GpuSoftmax::create_op(GpuWorkloadSketch &sketch, if(sketch_ctx->gpu_language() == GpuLanguage::OpenCL) { const auto cl_compile_ctx = sketch_ctx->cl_compile_context(); + ARM_COMPUTE_UNUSED(cl_compile_ctx); ARM_COMPUTE_ERROR_ON(cl_compile_ctx == nullptr); // Add Direct Conv2d Component diff --git a/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplatePool2d.cpp b/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplatePool2d.cpp index bbff8ba98f..fb86e163f2 100644 --- a/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplatePool2d.cpp +++ b/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplatePool2d.cpp @@ -40,11 +40,10 @@ namespace dynamic_fusion namespace { // Shape indexes for NHWC Datalayout -constexpr static int32_t batch_idx = 3; constexpr static int32_t height_idx = 2; constexpr static int32_t width_idx = 1; constexpr static int32_t channel_idx = 0; -} +} // namespace ClTemplatePool2d::ClTemplatePool2d(ComponentId id, const ArgumentPack<ITensorInfo> &tensors, const Attributes &attributes, @@ -390,12 +389,12 @@ TagLUT ClTemplatePool2d::get_tag_lut(const GpuKernelVariableTable &vtable, const lut["meta_kernel_id"] = id(); // Retrieve relevant data - const auto padding = _attributes.pad(); - const auto stride = _attributes.stride(); - const auto pool_size = _attributes.pool_size(); - const auto data_type = _src->data_type(); - const auto use_fp_mixed_precision = (_src->data_type() == DataType::F16) && _settings.mixed_precision() && _attributes.pool_type() != PoolingType::MAX; - const std::string max_initial_value = _settings.use_inf_as_limit() ? "(-INFINITY)" : float_to_string_with_full_precision(std::numeric_limits<float>::lowest()); + const auto padding = _attributes.pad(); + const auto stride = _attributes.stride(); + const auto pool_size = _attributes.pool_size(); + const auto data_type = _src->data_type(); + const auto use_fp_mixed_precision = (_src->data_type() == DataType::F16) && _settings.mixed_precision() && _attributes.pool_type() != PoolingType::MAX; + const std::string max_initial_value = _settings.use_inf_as_limit() ? "(-INFINITY)" : float_to_string_with_full_precision(std::numeric_limits<float>::lowest()); // pool specific lut["STRIDE_X"] = stride.x(); diff --git a/tests/validation/dynamic_fusion/gpu/cl/Add.cpp b/tests/validation/dynamic_fusion/gpu/cl/Add.cpp index afe5ee4da1..0034b0f07f 100644 --- a/tests/validation/dynamic_fusion/gpu/cl/Add.cpp +++ b/tests/validation/dynamic_fusion/gpu/cl/Add.cpp @@ -100,8 +100,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip( // clang-format on // *INDENT-ON* -constexpr AbsoluteTolerance<float> tolerance_f16(0.0001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ -constexpr AbsoluteTolerance<float> tolerance_f32(0.0001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ +constexpr AbsoluteTolerance<float> tolerance_f(0.0001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 and DataType::F16 */ constexpr float tolerance_num = 0.0001f; /**< Tolerance number */ template <typename T> @@ -123,7 +122,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunLargeOneOp, DynamicFusionCLAddFixture<float>, @@ -134,7 +133,7 @@ FIXTURE_DATA_TEST_CASE(RunLargeOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, DynamicFusionCLAddBroadcastFixture<float>, @@ -145,7 +144,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunLargeBroadcastOneOp, @@ -157,7 +156,7 @@ FIXTURE_DATA_TEST_CASE(RunLargeBroadcastOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunSmallTwoOps, DynamicFusionCLAddTwoOpsFixture<float>, @@ -169,7 +168,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallTwoOps, framework::dataset::make("FuseTwoOps", { true }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } TEST_SUITE_END() // FP32 @@ -183,7 +182,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32, tolerance_num); + validate(CLAccessor(_target), _reference, tolerance_f, tolerance_num); } FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, @@ -195,7 +194,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32, tolerance_num); + validate(CLAccessor(_target), _reference, tolerance_f, tolerance_num); } TEST_SUITE_END() // FP16 diff --git a/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp b/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp index 51822b045a..6d88be448e 100644 --- a/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp +++ b/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp @@ -38,12 +38,9 @@ TEST_SUITE(CL) TEST_SUITE(DYNAMIC_FUSION) TEST_SUITE(RESHAPE) -DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip( - framework::dataset::make("InputInfo", +DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(framework::dataset::make("InputInfo", { - TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::F32), - TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), - TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), // mismatching dimensions + TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::F32), TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32) /*mismatching dimensions*/, }), framework::dataset::make("OutputShape", { @@ -61,7 +58,8 @@ input_info, output_shape, expected) // Create sketch tensors TensorShape input_shape = input_info.tensor_shape(); - TensorInfo src_info = sketch.create_tensor_info(input_info); + ARM_COMPUTE_UNUSED(input_shape); + TensorInfo src_info = sketch.create_tensor_info(input_info); ReshapeAttributes attributes; attributes.shape(output_shape); |