Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

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.

Original prompt

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


💡 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 in the docs.

Copilot AI changed the title [WIP] Fix undeclared CudaHasBF16Support in ConvBF16Test Fix missing include for CudaHasBF16Support in conv_fp16_test.cc Nov 27, 2025
Copilot AI requested a review from fs-eire November 27, 2025 03:11
Copilot finished work on behalf of fs-eire November 27, 2025 03:11
@fs-eire
Copy link
Contributor

fs-eire commented Nov 27, 2025

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline

@fs-eire fs-eire marked this pull request as ready for review November 27, 2025 04:16
@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants