From 17c9ac9bf944033286d7e306a6cbd5ad297549ec Mon Sep 17 00:00:00 2001 From: Hari Seshadri Date: Thu, 15 Jan 2026 13:13:11 -0800 Subject: [PATCH 1/5] Fix warning around ununsed code in Android Emulator builds by clang --- .../test/providers/qnn/bf16_op_test.cc | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/onnxruntime/test/providers/qnn/bf16_op_test.cc b/onnxruntime/test/providers/qnn/bf16_op_test.cc index 7d3da9944b1e9..d473b02f6a018 100644 --- a/onnxruntime/test/providers/qnn/bf16_op_test.cc +++ b/onnxruntime/test/providers/qnn/bf16_op_test.cc @@ -14,11 +14,8 @@ namespace onnxruntime { namespace test { // Helper function to create a simple Add model for BF16 testing -static GetTestModelFn BuildBF16AddTestCase(const TestInputDef& input1_def, +[[maybe_unused]] static GetTestModelFn BuildBF16AddTestCase(const TestInputDef& input1_def, const TestInputDef& input2_def) { - // Silence unused function warning - (void)BuildBF16AddTestCase; - return [input1_def, input2_def](ModelTestBuilder& builder) { NodeArg* input1 = MakeTestInput(builder, input1_def); NodeArg* input2 = MakeTestInput(builder, input2_def); @@ -28,11 +25,8 @@ static GetTestModelFn BuildBF16AddTestCase(const TestInputDef& input1_def } // Helper function to create a simple MatMul model for BF16 testing -static GetTestModelFn BuildBF16MatMulTestCase(const TestInputDef& input1_def, +[[maybe_unused]] static GetTestModelFn BuildBF16MatMulTestCase(const TestInputDef& input1_def, const TestInputDef& input2_def) { - // Silence unused function warning - (void)BuildBF16MatMulTestCase; - return [input1_def, input2_def](ModelTestBuilder& builder) { NodeArg* input1 = MakeTestInput(builder, input1_def); NodeArg* input2 = MakeTestInput(builder, input2_def); @@ -42,11 +36,8 @@ static GetTestModelFn BuildBF16MatMulTestCase(const TestInputDef& input1_ } // Helper function to create a Conv model for BF16 testing -static GetTestModelFn BuildBF16ConvTestCase(const TestInputDef& input_def, +[[maybe_unused]] static GetTestModelFn BuildBF16ConvTestCase(const TestInputDef& input_def, const TestInputDef& weights_def) { - // Silence unused function warning - (void)BuildBF16ConvTestCase; - return [input_def, weights_def](ModelTestBuilder& builder) { NodeArg* input = MakeTestInput(builder, input_def); NodeArg* weights = MakeTestInput(builder, weights_def); @@ -56,13 +47,11 @@ static GetTestModelFn BuildBF16ConvTestCase(const TestInputDef& input_def } // Helper function to run BF16 model test -static void RunBF16ModelTest(const GetTestModelFn& build_test_case, +[[maybe_unused]] static void RunBF16ModelTest(const GetTestModelFn& build_test_case, const std::vector& input_shape, ExpectedEPNodeAssignment expected_ep_assignment = ExpectedEPNodeAssignment::All, int opset = 18, float fp32_abs_err = 1e-2f) { - // Silence unused function warning - (void)RunBF16ModelTest; ORT_UNUSED_PARAMETER(input_shape); ProviderOptions provider_options; From 30a3a067e68cf90626040deb3196b0e0aa43d7ab Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Thu, 15 Jan 2026 13:17:47 -0800 Subject: [PATCH 2/5] Update onnxruntime/test/providers/qnn/bf16_op_test.cc Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- onnxruntime/test/providers/qnn/bf16_op_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/test/providers/qnn/bf16_op_test.cc b/onnxruntime/test/providers/qnn/bf16_op_test.cc index d473b02f6a018..109622021db0d 100644 --- a/onnxruntime/test/providers/qnn/bf16_op_test.cc +++ b/onnxruntime/test/providers/qnn/bf16_op_test.cc @@ -15,7 +15,7 @@ namespace test { // Helper function to create a simple Add model for BF16 testing [[maybe_unused]] static GetTestModelFn BuildBF16AddTestCase(const TestInputDef& input1_def, - const TestInputDef& input2_def) { + const TestInputDef& input2_def) { return [input1_def, input2_def](ModelTestBuilder& builder) { NodeArg* input1 = MakeTestInput(builder, input1_def); NodeArg* input2 = MakeTestInput(builder, input2_def); From 867d045ceaa2ece6a5c7b8cf828186d242917ac4 Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Thu, 15 Jan 2026 13:17:54 -0800 Subject: [PATCH 3/5] Update onnxruntime/test/providers/qnn/bf16_op_test.cc Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- onnxruntime/test/providers/qnn/bf16_op_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/test/providers/qnn/bf16_op_test.cc b/onnxruntime/test/providers/qnn/bf16_op_test.cc index 109622021db0d..f74ea68b9e0a3 100644 --- a/onnxruntime/test/providers/qnn/bf16_op_test.cc +++ b/onnxruntime/test/providers/qnn/bf16_op_test.cc @@ -26,7 +26,7 @@ namespace test { // Helper function to create a simple MatMul model for BF16 testing [[maybe_unused]] static GetTestModelFn BuildBF16MatMulTestCase(const TestInputDef& input1_def, - const TestInputDef& input2_def) { + const TestInputDef& input2_def) { return [input1_def, input2_def](ModelTestBuilder& builder) { NodeArg* input1 = MakeTestInput(builder, input1_def); NodeArg* input2 = MakeTestInput(builder, input2_def); From 3c74e3e7b1f497621f9179674a49c95eb33f04ce Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Thu, 15 Jan 2026 13:18:06 -0800 Subject: [PATCH 4/5] Update onnxruntime/test/providers/qnn/bf16_op_test.cc Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- onnxruntime/test/providers/qnn/bf16_op_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/test/providers/qnn/bf16_op_test.cc b/onnxruntime/test/providers/qnn/bf16_op_test.cc index f74ea68b9e0a3..d2532c0319729 100644 --- a/onnxruntime/test/providers/qnn/bf16_op_test.cc +++ b/onnxruntime/test/providers/qnn/bf16_op_test.cc @@ -37,7 +37,7 @@ namespace test { // Helper function to create a Conv model for BF16 testing [[maybe_unused]] static GetTestModelFn BuildBF16ConvTestCase(const TestInputDef& input_def, - const TestInputDef& weights_def) { + const TestInputDef& weights_def) { return [input_def, weights_def](ModelTestBuilder& builder) { NodeArg* input = MakeTestInput(builder, input_def); NodeArg* weights = MakeTestInput(builder, weights_def); From cffa0eb92a63e35b98032385812a83dc9be7c2c8 Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Thu, 15 Jan 2026 13:18:32 -0800 Subject: [PATCH 5/5] Update onnxruntime/test/providers/qnn/bf16_op_test.cc Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- onnxruntime/test/providers/qnn/bf16_op_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/onnxruntime/test/providers/qnn/bf16_op_test.cc b/onnxruntime/test/providers/qnn/bf16_op_test.cc index d2532c0319729..1c2a7fa2c0720 100644 --- a/onnxruntime/test/providers/qnn/bf16_op_test.cc +++ b/onnxruntime/test/providers/qnn/bf16_op_test.cc @@ -48,10 +48,10 @@ namespace test { // Helper function to run BF16 model test [[maybe_unused]] static void RunBF16ModelTest(const GetTestModelFn& build_test_case, - const std::vector& input_shape, - ExpectedEPNodeAssignment expected_ep_assignment = ExpectedEPNodeAssignment::All, - int opset = 18, - float fp32_abs_err = 1e-2f) { + const std::vector& input_shape, + ExpectedEPNodeAssignment expected_ep_assignment = ExpectedEPNodeAssignment::All, + int opset = 18, + float fp32_abs_err = 1e-2f) { ORT_UNUSED_PARAMETER(input_shape); ProviderOptions provider_options;