Fix sccache for CTK 11.1 and properly track compilations in stats#2285
Fix sccache for CTK 11.1 and properly track compilations in stats#2285sylvestre merged 16 commits intomozilla:mainfrom
Conversation
…since tools like CMake parse the output and expect to see client paths not dist-server paths
|
sorry, i don't know |
…rsed by inputs/outputs even if the preprocessor, cicc, and ptxas commands are out of order.
30a1a7f to
b1acd9d
Compare
|
This doesn't seem to be an issue with sccache. It appears clang can't compile its own preprocessor output: #!/usr/bin/env bash
# Basic CUDA example from https://godbolt.org/
cat <<EOF >/tmp/test.cu
__global__ void square(int* array, int n) {
int tid = blockDim.x * blockIdx.x + threadIdx.x;
if (tid < n)
array[tid] = array[tid] * array[tid];
}
EOF
# Preprocess
clang++ -x cuda -E --cuda-gpu-arch=sm_80 --cuda-path=/usr/local/cuda -Wno-unknown-cuda-version /tmp/test.cu > /tmp/test.cui
# Compile (fails)
clang++ -x cuda-cpp-output --cuda-gpu-arch=sm_80 --cuda-path=/usr/local/cuda -Wno-unknown-cuda-version -o /tmp/test.cu.o /tmp/test.cui |
|
cc: @robertmaynard for review |
3b0ae6c to
5469482
Compare
02f84c0 to
ac6372a
Compare
|
This PR is ready to merge. |
|
Given that the initial implementation had issues and you are fixing them here, could you please add tests to cover these missing cases? |
6b9faab to
e7b529e
Compare
|
@sylvestre I added tests to ensure CTK v11.1 is the oldest version we test in CUDA Core Compute Libraries. I wouldn't mind testing earlier versions, but CTK v10.2 is only available up to ubuntu18.04, GH has removed ubuntu18.04 runners, so we'd have to containerize the test jobs. |
This PR has some fixes I neglected to add to #2247.
nvccin CUDA toolkit v11.1 didn't add the-D__CUDA_ARCH_LIST__=definition, so 5271494 expands the list of defines that indicate an nvcc host compiler invocation.--verboseare never dist-compiled, since the verbose output is parsed by tools like CMake and must reflect the local toolchain.-Xclangdoesn't failQuestion for @sylvestre related to the last point -- do you know which bits of the clang toolchain (or CTK?) sccache should package when using clang as a device compiler? I am seeing errors like the following when attempting to dist-compile with ClangCUDA, but I'm not sure which files define the
__nvvm_*symbols: