diff --git a/tests/validation/fixtures/ConvolutionLayerFixture.h b/tests/validation/fixtures/ConvolutionLayerFixture.h index 9dac137dcc..67f7d1337b 100644 --- a/tests/validation/fixtures/ConvolutionLayerFixture.h +++ b/tests/validation/fixtures/ConvolutionLayerFixture.h @@ -198,6 +198,11 @@ class ConvolutionValidationGenericFixture : public framework::Fixture bool padded_weights = false, bool updated_sq_info_after_config = false) { +#ifndef ARM_COMPUTE_CPU_ENABLED + ARM_COMPUTE_UNUSED(updated_sq_info_after_config); + ARM_COMPUTE_ERROR_ON(updated_sq_info_after_config); +#endif // ARM_COMPUTE_CPU_ENABLED + if (std::is_same::value && // Cpu (data_type == DataType::F16 || weights_data_type == DataType::F16) && !CPUInfo::get().has_fp16()) { @@ -236,6 +241,7 @@ class ConvolutionValidationGenericFixture : public framework::Fixture _use_dynamic_output_quant = true; } +#ifdef ARM_COMPUTE_CPU_ENABLED if (updated_sq_info_after_config) { _target = compute_gemmlowp_target_for_updated_sq_info_after_config( @@ -243,6 +249,7 @@ class ConvolutionValidationGenericFixture : public framework::Fixture pre_pad_layer, padded_weights); } else +#endif // ARM_COMPUTE_CPU_ENABLED { _target = compute_target(input_shape, weights_shape, bias_shape, output_shape, info, reshape_weights, dilation, act_info, pre_pad_layer, padded_weights); @@ -484,6 +491,7 @@ class ConvolutionValidationGenericFixture : public framework::Fixture return dst; } +#ifdef ARM_COMPUTE_CPU_ENABLED // Compute the target when updating static quantization information after configuration. TensorType compute_gemmlowp_target_for_updated_sq_info_after_config(TensorShape input_shape, TensorShape weights_shape, @@ -496,6 +504,9 @@ class ConvolutionValidationGenericFixture : public framework::Fixture PaddingList pre_pad_layer = PaddingList({}), bool padded_weights = false) { + // Runtime assert rather than static_assert because this template gets + // instantiated with FunctionType other than NEGEMMConvolutionLayer. The + // function call itself is prevented at runtime with conditions. ARM_COMPUTE_ASSERT((std::is_same::value == true)); ARM_COMPUTE_ERROR_ON((input_shape[2] % weights_shape[2]) != 0); @@ -612,6 +623,7 @@ class ConvolutionValidationGenericFixture : public framework::Fixture } return dst; } +#endif // ARM_COMPUTE_CPU_ENABLED SimpleTensor compute_reference(const TensorShape &input_shape, const TensorShape &weights_shape, diff --git a/tests/validation/fixtures/GEMMLowpFixture.h b/tests/validation/fixtures/GEMMLowpFixture.h index 0a80252388..79671c58a4 100644 --- a/tests/validation/fixtures/GEMMLowpFixture.h +++ b/tests/validation/fixtures/GEMMLowpFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2025 Arm Limited. + * Copyright (c) 2017-2026 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -105,6 +105,7 @@ struct TensorFillInfo int32_t hash{0}; }; +#ifdef ARM_COMPUTE_CPU_ENABLED template ::value == true)); ARM_COMPUTE_ASSERT(is_data_type_quantized_asymmetric(data_type_a)); ARM_COMPUTE_ASSERT(is_data_type_quantized_asymmetric(data_type_b)); @@ -222,6 +226,7 @@ TensorType compute_gemmlowp_target_for_updated_sq_info_after_config( gemmlowp.run(); return output; } +#endif // ARM_COMPUTE_CPU_ENABLED template (