Skip to content

Commit

Permalink
Use extended devcontainers for cudax testing.
Browse files Browse the repository at this point in the history
[skip-vdc][skip-rapids][skip-docs]
  • Loading branch information
alliepiper committed Oct 30, 2024
1 parent 7abd2c5 commit 3be1183
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 5 deletions.
54 changes: 54 additions & 0 deletions .devcontainer/cuda12.0ext-gcc12/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"shutdownAction": "stopContainer",
"image": "rapidsai/devcontainers:24.12-cpp-gcc12-cuda12.0ext",
"hostRequirements": {
"gpu": "optional"
},
"initializeCommand": [
"/bin/bash",
"-c",
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}; mkdir -m 0755 -p ${localWorkspaceFolder}/build;",
"if [[ -n ${WSLENV+set} ]]; then docker volume create cccl-build; else docker volume create --driver local --opt type=none --opt device=${localWorkspaceFolder}/build --opt o=bind cccl-build fi;"
],
"containerEnv": {
"SCCACHE_REGION": "us-east-2",
"SCCACHE_BUCKET": "rapids-sccache-devs",
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history",
"DEVCONTAINER_NAME": "cuda12.0ext-gcc12",
"CCCL_CUDA_VERSION": "12.0",
"CCCL_HOST_COMPILER": "gcc",
"CCCL_HOST_COMPILER_VERSION": "12",
"CCCL_BUILD_INFIX": "cuda12.0ext-gcc12",
"CCCL_CUDA_EXTENDED": "true"
},
"workspaceFolder": "/home/coder/${localWorkspaceFolderBasename}",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent",
"mounts": [
"source=${localWorkspaceFolder}/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=cccl-build,target=/home/coder/cccl/build"
],
"customizations": {
"vscode": {
"extensions": [
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
"nvidia.nsight-vscode-edition",
"ms-vscode.cmake-tools"
],
"settings": {
"editor.defaultFormatter": "xaver.clang-format",
"editor.formatOnSave": true,
"clang-format.executable": "/usr/bin/clang-format",
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}"
],
"files.eol": "\n",
"files.trimTrailingWhitespace": true
}
}
},
"name": "cuda12.0ext-gcc12"
}
54 changes: 54 additions & 0 deletions .devcontainer/cuda12.0ext-llvm14/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"shutdownAction": "stopContainer",
"image": "rapidsai/devcontainers:24.12-cpp-llvm14-cuda12.0ext",
"hostRequirements": {
"gpu": "optional"
},
"initializeCommand": [
"/bin/bash",
"-c",
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}; mkdir -m 0755 -p ${localWorkspaceFolder}/build;",
"if [[ -n ${WSLENV+set} ]]; then docker volume create cccl-build; else docker volume create --driver local --opt type=none --opt device=${localWorkspaceFolder}/build --opt o=bind cccl-build fi;"
],
"containerEnv": {
"SCCACHE_REGION": "us-east-2",
"SCCACHE_BUCKET": "rapids-sccache-devs",
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history",
"DEVCONTAINER_NAME": "cuda12.0ext-llvm14",
"CCCL_CUDA_VERSION": "12.0",
"CCCL_HOST_COMPILER": "llvm",
"CCCL_HOST_COMPILER_VERSION": "14",
"CCCL_BUILD_INFIX": "cuda12.0ext-llvm14",
"CCCL_CUDA_EXTENDED": "true"
},
"workspaceFolder": "/home/coder/${localWorkspaceFolderBasename}",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent",
"mounts": [
"source=${localWorkspaceFolder}/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=cccl-build,target=/home/coder/cccl/build"
],
"customizations": {
"vscode": {
"extensions": [
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
"nvidia.nsight-vscode-edition",
"ms-vscode.cmake-tools"
],
"settings": {
"editor.defaultFormatter": "xaver.clang-format",
"editor.formatOnSave": true,
"clang-format.executable": "/usr/bin/clang-format",
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}"
],
"files.eol": "\n",
"files.trimTrailingWhitespace": true
}
}
},
"name": "cuda12.0ext-llvm14"
}
54 changes: 54 additions & 0 deletions .devcontainer/cuda12.6ext-gcc12/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"shutdownAction": "stopContainer",
"image": "rapidsai/devcontainers:24.12-cpp-gcc12-cuda12.6ext",
"hostRequirements": {
"gpu": "optional"
},
"initializeCommand": [
"/bin/bash",
"-c",
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}; mkdir -m 0755 -p ${localWorkspaceFolder}/build;",
"if [[ -n ${WSLENV+set} ]]; then docker volume create cccl-build; else docker volume create --driver local --opt type=none --opt device=${localWorkspaceFolder}/build --opt o=bind cccl-build fi;"
],
"containerEnv": {
"SCCACHE_REGION": "us-east-2",
"SCCACHE_BUCKET": "rapids-sccache-devs",
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history",
"DEVCONTAINER_NAME": "cuda12.6ext-gcc12",
"CCCL_CUDA_VERSION": "12.6",
"CCCL_HOST_COMPILER": "gcc",
"CCCL_HOST_COMPILER_VERSION": "12",
"CCCL_BUILD_INFIX": "cuda12.6ext-gcc12",
"CCCL_CUDA_EXTENDED": "true"
},
"workspaceFolder": "/home/coder/${localWorkspaceFolderBasename}",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent",
"mounts": [
"source=${localWorkspaceFolder}/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=cccl-build,target=/home/coder/cccl/build"
],
"customizations": {
"vscode": {
"extensions": [
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
"nvidia.nsight-vscode-edition",
"ms-vscode.cmake-tools"
],
"settings": {
"editor.defaultFormatter": "xaver.clang-format",
"editor.formatOnSave": true,
"clang-format.executable": "/usr/bin/clang-format",
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}"
],
"files.eol": "\n",
"files.trimTrailingWhitespace": true
}
}
},
"name": "cuda12.6ext-gcc12"
}
54 changes: 54 additions & 0 deletions .devcontainer/cuda12.6ext-llvm18/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"shutdownAction": "stopContainer",
"image": "rapidsai/devcontainers:24.12-cpp-llvm18-cuda12.6ext",
"hostRequirements": {
"gpu": "optional"
},
"initializeCommand": [
"/bin/bash",
"-c",
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}; mkdir -m 0755 -p ${localWorkspaceFolder}/build;",
"if [[ -n ${WSLENV+set} ]]; then docker volume create cccl-build; else docker volume create --driver local --opt type=none --opt device=${localWorkspaceFolder}/build --opt o=bind cccl-build fi;"
],
"containerEnv": {
"SCCACHE_REGION": "us-east-2",
"SCCACHE_BUCKET": "rapids-sccache-devs",
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history",
"DEVCONTAINER_NAME": "cuda12.6ext-llvm18",
"CCCL_CUDA_VERSION": "12.6",
"CCCL_HOST_COMPILER": "llvm",
"CCCL_HOST_COMPILER_VERSION": "18",
"CCCL_BUILD_INFIX": "cuda12.6ext-llvm18",
"CCCL_CUDA_EXTENDED": "true"
},
"workspaceFolder": "/home/coder/${localWorkspaceFolderBasename}",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent",
"mounts": [
"source=${localWorkspaceFolder}/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=cccl-build,target=/home/coder/cccl/build"
],
"customizations": {
"vscode": {
"extensions": [
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
"nvidia.nsight-vscode-edition",
"ms-vscode.cmake-tools"
],
"settings": {
"editor.defaultFormatter": "xaver.clang-format",
"editor.formatOnSave": true,
"clang-format.executable": "/usr/bin/clang-format",
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}"
],
"files.eol": "\n",
"files.trimTrailingWhitespace": true
}
}
},
"name": "cuda12.6ext-llvm18"
}
6 changes: 6 additions & 0 deletions ci/build_cudax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ PRESET="cudax-cpp$CXX_STANDARD"

CMAKE_OPTIONS=""

# Enable extra mathlibs if we're in an extended CUDA image:
if $CCCL_CUDA_EXTENDED; then
echo "Image with extended CUDA libs detected, enabling STF MathLibs."
CMAKE_OPTIONS="$CMAKE_OPTIONS -Dcudax_ENABLE_CUDASTF_MATHLIBS=ON"
fi

configure_and_build_preset "CUDA Experimental" "$PRESET" "$CMAKE_OPTIONS"

print_time_summary
19 changes: 14 additions & 5 deletions ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ workflows:
# - {jobs: ['test'], project: 'thrust', std: 17, ctk: 'curr', cxx: ['gcc12', 'llvm16']}
#
override:
- {jobs: ['test_ext'], project: 'cudax', ctk: ['12.0' ], std: 'min', cxx: ['gcc12']}
- {jobs: ['test_ext'], project: 'cudax', ctk: [ 'curr'], std: 'all', cxx: ['gcc12']}
- {jobs: ['test_ext'], project: 'cudax', ctk: ['12.0' ], std: 'max', cxx: ['clang14']}
- {jobs: ['test_ext'], project: 'cudax', ctk: [ 'curr'], std: 'max', cxx: ['clang18']}

pull_request:
# Old CTK
Expand Down Expand Up @@ -46,10 +50,10 @@ workflows:
- {jobs: ['build'], project: 'cudax', ctk: ['12.0' ], std: 17, cxx: ['gcc12'], sm: "90"}
- {jobs: ['build'], project: 'cudax', ctk: [ 'curr'], std: 17, cxx: ['gcc13'], sm: "90a"}
- {jobs: ['build'], project: 'cudax', ctk: [ 'curr'], std: 'all', cxx: ['gcc13', 'clang16'], cpu: 'arm64'}
- {jobs: ['test'], project: 'cudax', ctk: ['12.0' ], std: 'min', cxx: ['gcc12']}
- {jobs: ['test'], project: 'cudax', ctk: [ 'curr'], std: 'all', cxx: ['gcc12']}
- {jobs: ['test'], project: 'cudax', ctk: ['12.0' ], std: 'max', cxx: ['clang14']}
- {jobs: ['test'], project: 'cudax', ctk: [ 'curr'], std: 'max', cxx: ['clang18']}
- {jobs: ['test_ext'], project: 'cudax', ctk: ['12.0' ], std: 'min', cxx: ['gcc12']}
- {jobs: ['test_ext'], project: 'cudax', ctk: [ 'curr'], std: 'all', cxx: ['gcc12']}
- {jobs: ['test_ext'], project: 'cudax', ctk: ['12.0' ], std: 'max', cxx: ['clang14']}
- {jobs: ['test_ext'], project: 'cudax', ctk: [ 'curr'], std: 'max', cxx: ['clang18']}
# Python and c/parallel jobs:
- {jobs: ['test'], project: ['cccl_c_parallel', 'python'], ctk: '12.6'}
# cccl-infra:
Expand Down Expand Up @@ -169,8 +173,9 @@ host_compilers:

# Jobs support the following properties:
#
# - gpu: Whether the job requires a GPU runner. Default is false.
# - name: The human-readable name of the job. Default is the capitalized job key.
# - gpu: Whether the job requires a GPU runner. Default is false.
# - cuda_ext: Whether the job requires a devcontainer with extra CUDA libraries. Default is false.
# - needs:
# - A list of jobs that must be completed before this job can run. Default is an empty list.
# - These are automatically added if needed:
Expand All @@ -188,6 +193,10 @@ jobs:
test: { gpu: true, needs: 'build' }
test_nobuild: { gpu: true, name: 'Test', invoke: { prefix: 'test' } }

# Use images with extra CUDA libs:
build_ext: { name: "Build (extra CTK libs)", gpu: false, cuda_ext: true, invoke: { prefix: 'build' } }
test_ext: { name: "Test (extra CTK libs)", gpu: true, cuda_ext: true, invoke: { prefix: 'test' }, needs: 'build_ext' }

# CCCL:
infra: { gpu: true } # example project launches a kernel

Expand Down

0 comments on commit 3be1183

Please sign in to comment.