Skip to content
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

Open
wants to merge 1 commit into
base: jitify2
Choose a base branch
from

Conversation

lamarrr
Copy link

@lamarrr lamarrr commented Feb 24, 2025

This merge requests fixes the compile error in CUDA 12.* where the Option's std::string constructor is called with a StringRef (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.

@@ -1680,9 +1680,9 @@ class LibNvJitLink
#if CUDA_VERSION >= 12030
case NVJITLINK_ERROR_THREADPOOL: return "NVJITLINK_ERROR_THREADPOOL";
#endif
default: return "(unknown nvJitLink error)";
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e8583fd

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());
Copy link
Member

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).

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants