mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
Fix CUDA 11.6 build error on Windows (#11578)
* Avoid windows header that defines 'small'
This commit is contained in:
parent
7e6d052275
commit
4fabc400de
1 changed files with 4 additions and 0 deletions
|
|
@ -476,6 +476,10 @@ if (onnxruntime_USE_CUDA)
|
|||
"${ONNXRUNTIME_ROOT}/core/providers/cuda/cuda_pch.cc"
|
||||
)
|
||||
|
||||
# minimize the Windows includes.
|
||||
# this avoids an issue with CUDA 11.6 where 'small' is defined in the windows and cuda headers.
|
||||
target_compile_definitions(onnxruntime_providers_cuda PRIVATE "WIN32_LEAN_AND_MEAN")
|
||||
|
||||
# disable a warning from the CUDA headers about unreferenced local functions
|
||||
#target_compile_options(onnxruntime_providers_cuda PRIVATE /wd4505)
|
||||
if (onnxruntime_USE_NUPHAR_TVM)
|
||||
|
|
|
|||
Loading…
Reference in a new issue