Skip to content

tests/std: Also test the latest version of CUDA #1598

@StephanTLavavej

Description

@StephanTLavavej

#639 was resolved by #1519 and #1539 adding test coverage for CUDA 10.1 Update 2. #1544 made this our minimum required version:

STL/stl/inc/yvals_core.h

Lines 509 to 514 in 721e3ad

#ifdef __CUDACC__
#if __CUDACC_VER_MAJOR__ < 10 \
|| (__CUDACC_VER_MAJOR__ == 10 \
&& (__CUDACC_VER_MINOR__ < 1 || (__CUDACC_VER_MINOR__ == 1 && __CUDACC_VER_BUILD__ < 243)))
#error STL1002: Unexpected compiler version, expected CUDA 10.1 Update 2 or newer.
#endif // ^^^ old CUDA ^^^

As of 2021-01-29, the latest version of CUDA is 11.2, see: https://developer.nvidia.com/cuda-downloads

We need to continue testing CUDA 10.1 Update 2 until we decide to increase our minimum required version. However, we should additionally be testing the latest version side-by-side. (Especially because CUDA 11 added support for C++17, see: https://news.developer.nvidia.com/cuda-11-toolkit/ )

This will involve changing our Virtual Machine Scale Set script to install the old and new CUDA versions side-by-side, and changing our test to invoke the different versions; at this time I don't know exactly what those changes will look like. Existing code:

$CudaUrl = `
'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe'
$CudaFeatures = 'nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 ' + `
'nvdisasm_10.1 nvprof_10.1 visual_profiler_10.1 visual_studio_integration_10.1 cublas_10.1 cublas_dev_10.1 ' + `
'cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 ' + `
'cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1 ' + `
'occupancy_calculator_10.1 fortran_examples_10.1'

<#
.SYNOPSIS
Installs NVIDIA's CUDA Toolkit.
.DESCRIPTION
InstallCuda installs the CUDA Toolkit with the features specified as a
space-separated list of strings in $Features.
.PARAMETER Url
The URL of the CUDA installer.
.PARAMETER Features
A space-separated list of features to install.
#>
Function InstallCuda {
Param(
[String]$Url,
[String]$Features
)
try {
Write-Host 'Downloading CUDA...'
[string]$installerPath = Get-TempFilePath -Extension 'exe'
curl.exe -L -o $installerPath -s -S $Url
Write-Host 'Installing CUDA...'
$proc = Start-Process -FilePath $installerPath -ArgumentList @('-s ' + $Features) -Wait -PassThru
$exitCode = $proc.ExitCode
if ($exitCode -eq 0) {
Write-Host 'Installation successful!'
}
else {
Write-Error "Installation failed! Exited with $exitCode."
}
}
catch {
Write-Error "Failed to install CUDA! $($_.Exception.Message)"
}
}

InstallCuda -Url $CudaUrl -Features $CudaFeatures

PM_COMPILER="nvcc" PM_CL="--x cu -Xcompiler -Od,-EHsc,-nologo,-W4,-WX,-openmp"

Metadata

Metadata

Assignees

No one assigned

    Labels

    testRelated to test code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions