Skip to content

Commit 07bf9a0

Browse files
Copilotfs-eire
andauthored
Fix missing include for CudaHasBF16Support in conv_fp16_test.cc (microsoft#26671)
### Description Adds missing `#include "test/common/cuda_op_test_utils.h"` to `conv_fp16_test.cc`. The `ConvBF16Test_Conv2D_1` test calls `CudaHasBF16Support()` but the header defining it was not included. ### Motivation and Context Fixes Linux CPU packaging pipeline build failure: ``` /onnxruntime_src/onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc:281:8: error: 'CudaHasBF16Support' was not declared in this scope 281 | if (!CudaHasBF16Support()) { | ^~~~~~~~~~~~~~~~~~ ``` Other test files using this function (`pool_fp16_op_test.cc`, `element_wise_ops_test.cc`, `skiplayernorm_op_test.cc`) already include this header. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > Linux CPU packaging pipeline failed with this error: > > > ``` > /onnxruntime_src/onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc: In member function ‘virtual void onnxruntime::test::ConvBF16Test_Conv2D_1_Test::TestBody()’: > /onnxruntime_src/onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc:281:8: error: ‘CudaHasBF16Support’ was not declared in this scope > 281 | if (!CudaHasBF16Support()) { > | ^~~~~~~~~~~~~~~~~~ > ``` > > it looks like `CudaHasBF16Support` is declared inside a macro section which is inconsistent. > > Please try to figure out the reason and perform a fix and make a PR for it </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: fs-eire <[email protected]>
1 parent 0b8180e commit 07bf9a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

onnxruntime/test/providers/cpu/nn/conv_fp16_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#if defined(MLAS_F16VEC_INTRINSICS_SUPPORTED) || defined(USE_COREML) || defined(USE_XNNPACK) || defined(USE_WEBGPU)
77

88
#include "gtest/gtest.h"
9+
#include "test/common/cuda_op_test_utils.h"
910
#include "test/common/random_generator.h"
1011
#include "test/providers/provider_test_utils.h"
1112
#include "default_providers.h"

0 commit comments

Comments
 (0)