Commit 07bf9a0
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
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments