-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove the cmake option: onnxruntime_DEV_MODE #13573
Conversation
#else | ||
-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) | ||
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__NVCC__) | ||
#define GSL_SUPPRESS(x) [[gsl::suppress(x)]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvcc doesn't recognize this "gsl" attribute namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I see how onnxruntime is probably the only GSL user to build it with nvcc, but on the other hand the patch is fairly small. Have you considered upstreaming it?
1. Remove the cmake option onnxruntime_DEV_MODE and replace it with "--compile-no-warning-as-error" 2. Suppress some GSL warnings because now we treat nvcc diag warnings as errors
URL https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.zip | ||
URL_HASH SHA1=cf368104cd22a87b4dd0c80228919bb2df3e2a14 | ||
) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong, but the patch is safe to apply even when building with CUDA support turned off? What do you think about applying it unconditionally instead, so that both cuda-ful and cuda-free builds are built from "identical" source code?
Description
Motivation and Context