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

nvcc fails when uncacheable #2372

Open
charlie-rivos opened this issue Mar 26, 2025 · 3 comments
Open

nvcc fails when uncacheable #2372

charlie-rivos opened this issue Mar 26, 2025 · 3 comments

Comments

@charlie-rivos
Copy link

Instead of doing an uncached compilation and logging that the compilation was uncacheable, sccache exits when it encounters uncacheable nvcc args.

The code responsible is here:

CompilerArguments::CannotCache(why, extra_info) => Err(extra_info

This behavior prevents users from using sccache when there happens to be a program with uncacheable args.

@charlie-rivos
Copy link
Author

@trxcllnt

@trxcllnt
Copy link
Contributor

@charlie-rivos which arguments are failing to parse? nvcc has many arguments not explicitly enumerated in sccache, but you can usually work around it by using = as the separator, e.g. -diag-suppress=1407 instead of -diag-suppress 1407.

@charlie-rivos
Copy link
Author

Oh that's embarrassing, thank you that was the issue. I guess the CanBeSeparated logic doesn't quite work as intended?

This behavior still seems somewhat surprising to have sccache crash if it encounters an uncacheable compilation. I believe other parts of sccache log a compilation attempt as uncacheable and fall back to doing an uncached compilation in this case instead of aborting. Is there a reason to have nvcc abort instead of performing a fallback?

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

No branches or pull requests

2 participants