Skip to content

Commit

Permalink
test CTK 11.1 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt authored and sylvestre committed Dec 3, 2024
1 parent 26378eb commit a1c33d4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
14 changes: 12 additions & 2 deletions .github/actions/nvcc-toolchain/install-cuda.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,19 @@ $mmbVersionTag = "${major}.${minor}.${build}"
# mm = major minor
$mmVersionTag = "${major}.${minor}"

# `cuda_${mmbVersionTag}_windows_network.exe` name only valid back to CUDA v11.5.1.
# Before that it was named `cuda_${mmbVersionTag}_win10_network.exe`.
$cudaVersionUrl = "https://developer.download.nvidia.com/compute/cuda/${mmbVersionTag}/network_installers/cuda_${mmbVersionTag}_windows_network.exe"

###
# `cuda_${mmbVersionTag}_windows_network.exe` name only valid back to CUDA v11.5.1.
# Before that it was named `cuda_${mmbVersionTag}_win10_network.exe`:
# * https://developer.download.nvidia.com/compute/cuda/11.5.1/network_installers/cuda_11.5.1_windows_network.exe
# * https://developer.download.nvidia.com/compute/cuda/11.5.0/network_installers/cuda_11.5.0_win10_network.exe
###

if ([version]$mmbVersionTag -le "11.5.0") {
$cudaVersionUrl = "https://developer.download.nvidia.com/compute/cuda/${mmbVersionTag}/network_installers/cuda_${mmbVersionTag}_win10_network.exe"
}

$cudaComponents =
"nvcc_$mmVersionTag",
"curand_$mmVersionTag",
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
# Oldest tested CUDA Toolkit version. Older CTKs might work, but they're
# difficult to test without Ubuntu18.04 GHA runners or containerized jobs.
cuda: "11.1"
extra_desc: cuda11.1
# Oldest supported version, keep in sync with README.md
rustc: "1.75.0"
- os: ubuntu-22.04
Expand Down Expand Up @@ -97,11 +101,11 @@ jobs:
# # M1 CPU
- os: macos-14
- os: windows-2019
cuda: "11.8"
cuda: "11.1"
# Oldest supported version, keep in sync with README.md
rustc: "1.75.0"
extra_args: --no-fail-fast
extra_desc: cuda11.8
extra_desc: cuda11.1
- os: windows-2019
cuda: "11.8"
rustc: nightly
Expand Down Expand Up @@ -152,7 +156,14 @@ jobs:
sudo apt remove -y gcc-14 g++-14
sudo apt autoremove -y
fi
sudo apt install -y --no-install-recommends clang gcc
# Ubuntu20.04's clang-10 is too old for CTK 11+, so install clang-12 instead
if test "${{ matrix.os }}" = "ubuntu-20.04" && test -n "${{ matrix.cuda }}"; then
sudo apt install -y --no-install-recommends gcc clang-12
sudo ln -sf $(which clang-12) /usr/bin/clang
sudo ln -sf $(which clang++-12) /usr/bin/clang++
else
sudo apt install -y --no-install-recommends gcc clang
fi
echo 'gcc version:'
gcc --version
echo 'clang version:'
Expand Down
11 changes: 5 additions & 6 deletions src/compiler/nvcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ where
} {
if log_enabled!(log::Level::Trace) {
trace!(
"[{}]: transformed nvcc command: {:?}",
"[{}]: transformed nvcc command: \"{}\"",
output_file_name.to_string_lossy(),
[
&[format!("cd {} &&", dir.to_string_lossy()).to_string()],
Expand Down Expand Up @@ -1032,7 +1032,8 @@ fn fold_env_vars_or_split_into_exe_and_args(
let line = line
.replace("\"\"", "\"")
.replace(r"\\?\", "")
.replace('\\', "/");
.replace('\\', "/")
.replace(r"//?/", "");
match host_compiler {
NvccHostCompiler::Msvc => line.replace(" -E ", " -P ").replace(" > ", " -Fi"),
_ => line,
Expand Down Expand Up @@ -1202,14 +1203,12 @@ where

if log_enabled!(log::Level::Trace) {
trace!(
"[{}]: run_commands_sequential cwd={:?}, cmd={:?}",
"[{}]: run_commands_sequential cwd={:?}, cmd=\"{}\"",
output_file_name.to_string_lossy(),
cwd,
[
vec![exe.clone().into_os_string().into_string().unwrap()],
args.iter()
.map(|x| shlex::try_quote(x).unwrap().to_string())
.collect::<Vec<_>>()
args.to_vec()
]
.concat()
.join(" ")
Expand Down

0 comments on commit a1c33d4

Please sign in to comment.