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

Add tests for clang as cuda compiler, and support the -x cuda syntax #1892

Merged

Conversation

robertmaynard
Copy link
Collaborator

@robertmaynard robertmaynard commented Sep 27, 2023

While not offically documented, clang as a cuda compiler did work with sccache due to the existing support of -x cu as a general language flag. Unforunately this isn't sufficient for CMake based projects as it generates compile lines that use -x cuda.

So I have relaxed the parsing of -x to include cuda, and backfilled the clang tests to verify cuda compilation.

Note: Cherry-picked cb4ad6365f742df07927a0397e60b00db8faf535 from #1889 so that I could expand the test/system.rs to verify clang++ as a cuda compiler.

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2023

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (8253364) 29.77% compared to head (2cc6cde) 29.86%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1892      +/-   ##
==========================================
+ Coverage   29.77%   29.86%   +0.09%     
==========================================
  Files          49       50       +1     
  Lines       17699    17898     +199     
  Branches     8524     8628     +104     
==========================================
+ Hits         5270     5346      +76     
- Misses       7311     7404      +93     
- Partials     5118     5148      +30     
Files Coverage Δ
src/compiler/gcc.rs 57.01% <0.00%> (+0.91%) ⬆️
src/compiler/clang.rs 53.95% <56.00%> (+0.19%) ⬆️
tests/system.rs 24.83% <3.70%> (-1.34%) ⬇️

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@illsilin
Copy link

What about support for -x hip?

@sylvestre sylvestre merged commit eb292cd into mozilla:main Oct 17, 2023
38 of 39 checks passed
@robertmaynard robertmaynard deleted the fea/add_clang_as_cuda_compiler branch October 17, 2023 12:46
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.

4 participants