diff --git a/.github/actions/workflow-run-job-linux/action.yml b/.github/actions/workflow-run-job-linux/action.yml index fa15026bffb..52b7db46922 100644 --- a/.github/actions/workflow-run-job-linux/action.yml +++ b/.github/actions/workflow-run-job-linux/action.yml @@ -181,6 +181,7 @@ runs: ${cuda_ext_request:-} \ "${gpu_request[@]}" \ ${aws_arn:-} \ + --env "SCCACHE_RECACHE=1" \ --env "CI=true" \ --env "COMMAND=$COMMAND" \ --env "GH_TOKEN=$GH_TOKEN" \ diff --git a/.github/actions/workflow-run-job-windows/action.yml b/.github/actions/workflow-run-job-windows/action.yml index d90da588638..0ea06424505 100644 --- a/.github/actions/workflow-run-job-windows/action.yml +++ b/.github/actions/workflow-run-job-windows/action.yml @@ -175,6 +175,7 @@ runs: --workdir "${{steps.paths.outputs.MOUNT_REPO}}" \ --isolation=process \ ${{ env.ENABLE_GPU }} \ + --env "SCCACHE_RECACHE=1" \ --env COMMAND='& ${{inputs.command}}' \ --env "ARTIFACT_ARCHIVES=${{env.ARTIFACT_ARCHIVES}}" \ --env "ARTIFACT_UPLOAD_REGISTERY=${{env.ARTIFACT_UPLOAD_REGISTERY}}" \ diff --git a/CMakePresets.json b/CMakePresets.json index 92115f3b5dd..c1e74af6b14 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -200,6 +200,7 @@ "displayName": "Thrust", "inherits": "base", "cacheVariables": { + "CMAKE_CUDA_ARCHITECTURES": "minmax-major-cccl", "CCCL_ENABLE_THRUST": true, "THRUST_ENABLE_MULTICONFIG": true, "THRUST_MULTICONFIG_ENABLE_SYSTEM_CPP": true, diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 722fd6791d5..794069fb69c 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -21,6 +21,7 @@ workflows: # args: '--preset libcudacxx --lit-tests "cuda/utility/basic_any.pass.cpp"' } # override: + - { jobs: ['build'], cxx: ['gcc', 'clang', 'msvc'], sm: ["all-cccl", "all-major-cccl", "minmax-major-cccl"] } pull_request: # Old CTK: Oldest/newest supported host compilers: @@ -101,13 +102,13 @@ workflows: - {project: 'cub', jobs: ['build'], std: 'max', cudacxx: 'clang', ctk: 'clang-cuda', cxx: 'clang-cuda', sm: '75;80;90;100', cmake_options: '-DCUB_ENABLE_LAUNCH_VARIANTS=OFF'} # Thrust - Keep number of sm small. Kernel coverage is in CUB. This just tests dispatch / glue in lite mode: - {project: 'thrust', jobs: ['test'], std: 'max', cxx: ['gcc', 'msvc'], gpu: 'rtx4090', sm: 'gpu'} - - {project: 'thrust', jobs: ['build'], std: 'max', cxx: 'clang', sm: '75;120'} - - {project: 'thrust', jobs: ['build'], std: 'max', ctk: 'nvhpc', cxx: 'nvhpc', sm: '75;120'} + - {project: 'thrust', jobs: ['build'], std: 'max', cxx: 'clang'} + - {project: 'thrust', jobs: ['build'], std: 'max', ctk: 'nvhpc', cxx: 'nvhpc'} - {project: 'thrust', jobs: ['build'], std: 'max', cudacxx: 'clang', ctk: 'clang-cuda', cxx: 'clang-cuda', sm: '75;100'} # cudax - {project: 'cudax', jobs: ['test'], std: 'max', cxx: ['gcc', 'msvc'], gpu: 'rtx2080', sm: 'gpu'} - - {project: 'cudax', jobs: ['build'], std: 'max', cxx: 'clang', sm: '75;120'} - - {project: 'cudax', jobs: ['build'], std: 'max', ctk: 'nvhpc', cxx: 'nvhpc', sm: '75;120'} + - {project: 'cudax', jobs: ['build'], std: 'max', cxx: 'clang', sm: 'minmax-major-cccl'} + - {project: 'cudax', jobs: ['build'], std: 'max', ctk: 'nvhpc', cxx: 'nvhpc', sm: 'minmax-major-cccl'} # stdpar - {project: 'stdpar', jobs: ['build'], std: 'max', ctk: 'nvhpc', cxx: 'nvhpc'} # Python + support diff --git a/cmake/CCCLCheckCudaArchitectures.cmake b/cmake/CCCLCheckCudaArchitectures.cmake index 045e5c6ad93..25793ed7be4 100644 --- a/cmake/CCCLCheckCudaArchitectures.cmake +++ b/cmake/CCCLCheckCudaArchitectures.cmake @@ -8,11 +8,14 @@ # 'all-major-cccl': All major architectures known to the current NVCC above minimum_cccl_arch, # plus 'minimum_cccl_arch'. # +# 'minmax-major-cccl': The minimum and maximum major architectures known to the current NVCC. +# # For example on 12.9: # all: 50-real;52-real;53-real;60-real;61-real;62-real;70-real;72-real;75-real;80-real;86-real;87-real;89-real;90-real;100-real;101-real;103-real;120-real;121-real;121-virtual # all-cccl: 75-real;80-real;86-real;87-real;89-real;90-real;100-real;101-real;103-real;120-real;121-real;121-virtual # all-major: 50-real;60-real;70-real;80-real;90-real;100-real;120-real;120-virtual # all-major-cccl: 75-real;80-real;90-real;100-real;120-real;120-virtual +# minmax-major-cccl: 75-real;75-virtual;120-real;120-virtual # We don't support arches below what the latest CTK release supports: set(minimum_cccl_arch 75) # 13.x dropped below Turing @@ -32,6 +35,8 @@ function(cccl_check_cuda_architectures) _cccl_filter_to_all_major_cccl(arches) elseif (CMAKE_CUDA_ARCHITECTURES STREQUAL "all-cccl") # No further filtering needed, just use the arches as is. + elseif (CMAKE_CUDA_ARCHITECTURES STREQUAL "minmax-major-cccl") + _cccl_filter_to_minmax_major_cccl(arches) else() message( FATAL_ERROR @@ -39,7 +44,12 @@ function(cccl_check_cuda_architectures) ) endif() - _cccl_add_real_virtual_arch_tags(arches) + if (CMAKE_CUDA_ARCHITECTURES MATCHES "minmax") + _cccl_add_all_real_all_virtual_arch_tags(arches) + else() + _cccl_add_all_real_last_virtual_arch_tags(arches) + endif() + message(STATUS "Replacing with CMAKE_CUDA_ARCHITECTURES=${arches}") set( CMAKE_CUDA_ARCHITECTURES @@ -104,7 +114,23 @@ function(_cccl_filter_to_all_major_cccl arches_var) set(${arches_var} ${major_arches} PARENT_SCOPE) endfunction() -function(_cccl_add_real_virtual_arch_tags arches_var) +function(_cccl_filter_to_minmax_major_cccl arches_var) + _cccl_filter_to_all_major_cccl(${arches_var}) + + set(minmax_arches) + list(POP_FRONT ${arches_var} first_arch) + list(APPEND minmax_arches ${first_arch}) + if (arches_var) + list(POP_BACK ${arches_var} last_arch) + list(APPEND minmax_arches ${last_arch}) + endif() + + message(VERBOSE "CCCL minmax-major arches: ${minmax_arches}") + set(${arches_var} ${minmax_arches} PARENT_SCOPE) +endfunction() + +# All real + virtual for latest. +function(_cccl_add_all_real_last_virtual_arch_tags arches_var) set(tagged_arches "") list(POP_BACK ${arches_var} last_arch) @@ -119,3 +145,16 @@ function(_cccl_add_real_virtual_arch_tags arches_var) message(VERBOSE "CCCL tagged arches: ${tagged_arches}") set(${arches_var} ${tagged_arches} PARENT_SCOPE) endfunction() + +# Real+virtual for all: +function(_cccl_add_all_real_all_virtual_arch_tags arches_var) + set(tagged_arches "") + + foreach (arch IN LISTS ${arches_var}) + list(APPEND tagged_arches "${arch}-real") + list(APPEND tagged_arches "${arch}-virtual") + endforeach() + + message(VERBOSE "CCCL tagged arches: ${tagged_arches}") + set(${arches_var} ${tagged_arches} PARENT_SCOPE) +endfunction()