[BUILD] Fix Build Errors and Warnings in CUDA Providers #27276
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
User reported build error in #27269.
This PR addresses several build issues and compilation warnings in the CUDA provider and associated contrib ops. These fixes ensure a clean build and improved compatibility with different CUDA versions (specifically CUDA 13.1) and compilers.
Changes
1. Fix ShardedMoE Compilation Error
moe_helper::CheckInputscall to provide the requiredzero_pointsarguments (passingnullptr), aligning with the updated function signature.2. Suppress CUDA 13.1 System Header Warnings
-Wunused-parameterwarnings incuda_fp4.h.3. Resolve Sign-Comparison Warnings
-Wsign-comparewarnings that were being treated as errors:size_tin onnxruntime/core/providers/cuda/tensor/pad.cc.size_tforint64_tcomparisons in onnxruntime/contrib_ops/cuda/collective/distributed_reshape.cc.Verification
--cmake_extra_defines onnxruntime_USE_NCCL=ON