Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/workflow-run-job-linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/workflow-run-job-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}" \
Expand Down
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 5 additions & 4 deletions ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
43 changes: 41 additions & 2 deletions cmake/CCCLCheckCudaArchitectures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,14 +35,21 @@ 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
"Invalid CMAKE_CUDA_ARCHITECTURES value: ${CMAKE_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
Expand Down Expand Up @@ -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)
Expand All @@ -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()
Loading