Open trxcllnt opened 1 week ago
sorry, i don't know
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
This PR has some fixes I neglected to add to https://github.com/mozilla/sccache/pull/2247.
nvcc
in CUDA toolkit v11.1 didn't add the-D__CUDA_ARCH_LIST__=
definition, so https://github.com/mozilla/sccache/commit/5271494812b237812e90aa89bcb9a9c14f9d91cf expands the list of defines that indicate an nvcc host compiler invocation.--verbose
are never dist-compiled, since the verbose output is parsed by tools like CMake and must reflect the local toolchain.-Xclang
doesn'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: