-
Notifications
You must be signed in to change notification settings - Fork 463
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
Refine CUDA documentation. #799
Conversation
Just in case. One can wonder if it would be more appropriate to prefix user-provided flags with -Xcompiler on user's behalf. As opposed to documenting it as suggested. Problem is that we don't want to break build scripts that had to figure out the current state of affairs and explicitly prefix their flags. Though it's not impossible to take a note if build script has passed -Xcompiler and add one if deemed necessary. "Deemed necessary" refers to the fact that it's not really appropriate to prefix all flags, only those not recognized by nvcc. For example, it would be inappropriate to prefix |
src/lib.rs
Outdated
/// `.flag("-Xcompiler").flag("-fpermissive")`. Consult Nvidia | ||
/// documentation for further information. |
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 it'd be great if we could also link to it.
/// `.flag("-Xcompiler").flag("-fpermissive")`. Consult Nvidia | |
/// documentation for further information. | |
/// `.flag("-Xcompiler").flag("-fpermissive")`. See the Nvidia | |
/// documentation for more information. |
src/lib.rs
Outdated
/// "-Xcompiler" flags. | ||
/// Enabling CUDA will invoke the CUDA compiler, NVCC. While NVCC accepts | ||
/// most common compiler flags, e.g. `-std=c++17`, some project-specific | ||
/// flags might have to prefixed with "-Xcompiler" flag, for example as |
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.
/// flags might have to prefixed with "-Xcompiler" flag, for example as | |
/// flags might have to be prefixed with "-Xcompiler" flag, for example as |
src/lib.rs
Outdated
/// CUDA sources since NVCC only accepts a limited set of GNU-like flags, | ||
/// while the rest must be prefixed with the `-Xcompiler` flag to get passed | ||
/// to the underlying C++ compiler. | ||
/// Nvidia compiler accepts only most common compiler flags like `-D`, |
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.
/// Nvidia compiler accepts only most common compiler flags like `-D`, | |
/// Nvidia compiler accepts only the most common compiler flags like `-D`, |
Original wording gives an impression that user-provided flags are prefixed with -Xcompiler, which is not the case. -Xcompiler is added only to internally generated flags.
c4fd4f7
to
ecc60ba
Compare
Resolved the nits and re-based just in 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.
Thank you!
Original wording gives an impression that user-provided flags are prefixed with -Xcompiler, which is not the case. -Xcompiler is added only to internally generated flags.