-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUDA providers failed to build against 12.6 with error error #221-D #22728
Comments
egortech
changed the title
[Build]
CUDA providers failed to build against 12.6 with error error #221-D. [Build]
Nov 5, 2024
egortech
changed the title
CUDA providers failed to build against 12.6 with error error #221-D. [Build]
CUDA providers failed to build against 12.6 with error error #221-D
Nov 5, 2024
github-actions
bot
added
the
ep:CUDA
issues related to the CUDA execution provider
label
Nov 5, 2024
I can confirm the problem exists. We should directly use std::numeric_limits instead. I tried to update the code but I cannot understand it. It mix uses of INFINITY and max. It also uses -INFINITY which usually is not meanful. @tianleiwu / @yufenglee, do you have time to take a look? |
PR #13594 |
Thanks for reporting. Let me create a PR to fix it. |
Thank you @tianleiwu |
tianleiwu
added a commit
that referenced
this issue
Nov 6, 2024
### Description * Fix `NumericLimits<float>` that used infinity as max, which is not consistent with `std::numeric_limits<float>::max()` In Windows, (float)(1e+300) is used for INFINITY, which causes compiler error in Visual Studio 2022 v17.12 Preview 5. * Rename `NumericLimits<T>::Min` to Lowest to be consistent with std::numeric_limits * Fix topk implementation: use `NumericLimits<CudaT>` instead of `NumericLimits<T>` in kernel. That could avoid defining a confusing defintion of `NumericLimits<MLFloat16>` that returns half instead of MLFloat16. * Use CUDART_MAX_NORMAL_FP16 if possible. It sets bits value directly, which is faster than converting float to half. Note that NumericLimits does not support __nv_bfloat16 and _nv_fp8_e4m3 and __nv_fp8_e5m2 right now. ### Motivation and Context #22728
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue
CUDA providers failed to build against 12.6 with error error
#221-D
.Urgency
No response
Target platform
Windows 11
Build script
Error / output
Visual Studio Version
Visual Studio 2022 v17.12 Preview 5
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: