From 52d099abdd2d7be57d1f3fed596004780f2d6dd6 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Mon, 23 Dec 2024 16:12:26 +0800 Subject: [PATCH] typo and lint --- onnxruntime/core/providers/cpu/fp16/fp16_activations.h | 2 +- onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc | 6 +++--- onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/onnxruntime/core/providers/cpu/fp16/fp16_activations.h b/onnxruntime/core/providers/cpu/fp16/fp16_activations.h index 7ee7af410eb8b..1a7727921877b 100644 --- a/onnxruntime/core/providers/cpu/fp16/fp16_activations.h +++ b/onnxruntime/core/providers/cpu/fp16/fp16_activations.h @@ -74,7 +74,7 @@ struct LeakyRelu : public ElementWiseRangedTransform { // TODO Add the following activations: // MlasTanhActivation, // MlasLogisticActivation, -// MlasClipActivation, +// MlasClipActivation, // Once it's added, please update TestNhwcConvReluClipFusion_FP16 // in xnnpack_basic_test.cc // to enable outputs verification for Clip activation. diff --git a/onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc b/onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc index 4c0968241e14d..46ffaf6737d73 100644 --- a/onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc +++ b/onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc @@ -56,12 +56,12 @@ void TestConvFp16Op(const ConvOpAndTestAttributes& attributes, } else if (attributes.domain == onnxruntime::kMSInternalNHWCDomain) { op = "Conv"; tester = std::make_unique(op, opset, attributes.domain); - } else if (attributes.domain == onnxruntime::kOnnxDomain) { + } else if (attributes.domain == onnxruntime::kOnnxDomain) { op = "FusedConv"; } else { ORT_THROW("Unsupported domain: ", attributes.domain); } - + tester->AddAttribute("activation", attributes.activation); if (!attributes.activation_parameters.empty()) { @@ -1176,7 +1176,7 @@ TEST(ConvFp16Test, Pointwise_Relu) { }; run_test(attrs); attrs.domain = kMSInternalNHWCDomain; - attrs.excluded_providers = {kCpuExecutionProvider}; + attrs.excluded_providers = {kCpuExecutionProvider}; run_test(attrs); } diff --git a/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc b/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc index f378c1fcc0a14..f736dab0d69f6 100644 --- a/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc +++ b/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc @@ -128,7 +128,6 @@ TEST(XnnpackEP, TestNhwcConvReluFusion_FP16) { params.graph_verifier = &verify; auto ep = DefaultXnnpackExecutionProvider(); - // So far, CPU EP doensn't support Fp16 Conv fusion, so verify_outputs is skipped. RunAndVerifyOutputsWithEP(ort_model_path, "TestNhwcConvReluFusion_FP16", std::move(ep), feeds, params); }; @@ -172,7 +171,7 @@ TEST(XnnpackEP, TestNhwcConvReluClipFusion_FP16) { params.graph_verifier = &verify; auto ep = DefaultXnnpackExecutionProvider(); - // So far, CPU EP doensn't support Fp16 Conv fusion, so verify_outputs is skipped. + // So far, CPU EP doesn't support Fp16 Conv fusion, so verify_outputs is skipped. RunAndVerifyOutputsWithEP(ort_model_path, "TestNhwcConvReluClipFusion_FP16", std::move(ep), feeds, params, {}, false); } #endif