-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fixed compile error and switch case warning #138
base: jitify2
Are you sure you want to change the base?
Conversation
@@ -1680,9 +1680,9 @@ class LibNvJitLink | |||
#if CUDA_VERSION >= 12030 | |||
case NVJITLINK_ERROR_THREADPOOL: return "NVJITLINK_ERROR_THREADPOOL"; | |||
#endif | |||
default: return "(unknown nvJitLink error)"; |
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.
I think this will prevent warnings in future when CUDA adds new enums (e.g., NVJITLINK_ERROR_UNRECOGNIZED_INPUT
, which I added in the WIP branch but not here).
Is there another way to avoid the warning you're seeing?
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.
I think that was the missing enum, I'll check.
Which branch is that and what's the jitify2 merge timeline like?
I don't think there's any other way other than adding the enum or having a default case.
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.
I'm hoping to merge that PR in the near future, and then merge jitify2 into master after that.
: Option(output_key, compiler_option.value()); | ||
output_key.empty() | ||
? compiler_option | ||
: Option(std::string{output_key}, compiler_option.value()); |
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.
Thanks for this fix. (I didn't see it because our tests are still set to C++11; we should probably bump to 17).
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.
yeah, it would be helpful to test for all supported C++ versions, otherwise compile errors like that will eventually happen
This merge requests fixes the compile error in CUDA 12.* where the Option's
std::string
constructor is called with aStringRef
(std::string_view
) which is not a valid implicit conversion.GCC also is not convinced that all branches in jitify2.hpp:1682 are taken, and thus raises a warning, we have warnings as errors in CUDF so it breaks our build.