Skip to content

Skip building custom_op_library if CUDA_MINIMAL is enabled #27520

Merged
chilo-ms merged 1 commit intomainfrom
chi/fix_cuda_minimal_build
Mar 14, 2026
Merged

Skip building custom_op_library if CUDA_MINIMAL is enabled #27520
chilo-ms merged 1 commit intomainfrom
chi/fix_cuda_minimal_build

Conversation

@chilo-ms
Copy link
Contributor

@chilo-ms chilo-ms commented Mar 3, 2026

Description

Skip building custom_op_library library if CUDA_MINIMAL is enabled

Motivation and Context

#27308 removes cudnn include for custom_op_library target in cmake if CUDA_MINIMAL is enabled.

In fact, the custom_op_library target does not define the USE_CUDA_MINIMAL macro (no
target_compile_definitions(custom_op_library PRIVATE -DUSE_CUDA_MINIMAL) in onnxruntime_unittests.cmake), so one of the files, i.e. cuda_context.h included in cuda_ops.cc still includes cudnn.h and the CI just got lucky to pass becasue cudnn.h is in --cuda_home. If building locally, it might fail to find cudnn.h.

@chilo-ms chilo-ms requested a review from tianleiwu March 3, 2026 06:30
@chilo-ms chilo-ms merged commit b280801 into main Mar 14, 2026
91 checks passed
@chilo-ms chilo-ms deleted the chi/fix_cuda_minimal_build branch March 14, 2026 00:19
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