From 3be1183a19ed679470e1e8a75cbe31d1702c78ac Mon Sep 17 00:00:00 2001 From: Allison Piper Date: Wed, 30 Oct 2024 15:22:56 +0000 Subject: [PATCH] Use extended devcontainers for cudax testing. [skip-vdc][skip-rapids][skip-docs] --- .../cuda12.0ext-gcc12/devcontainer.json | 54 +++++++++++++++++++ .../cuda12.0ext-llvm14/devcontainer.json | 54 +++++++++++++++++++ .../cuda12.6ext-gcc12/devcontainer.json | 54 +++++++++++++++++++ .../cuda12.6ext-llvm18/devcontainer.json | 54 +++++++++++++++++++ ci/build_cudax.sh | 6 +++ ci/matrix.yaml | 19 +++++-- 6 files changed, 236 insertions(+), 5 deletions(-) create mode 100644 .devcontainer/cuda12.0ext-gcc12/devcontainer.json create mode 100644 .devcontainer/cuda12.0ext-llvm14/devcontainer.json create mode 100644 .devcontainer/cuda12.6ext-gcc12/devcontainer.json create mode 100644 .devcontainer/cuda12.6ext-llvm18/devcontainer.json diff --git a/.devcontainer/cuda12.0ext-gcc12/devcontainer.json b/.devcontainer/cuda12.0ext-gcc12/devcontainer.json new file mode 100644 index 00000000000..eac9174d848 --- /dev/null +++ b/.devcontainer/cuda12.0ext-gcc12/devcontainer.json @@ -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" +} diff --git a/.devcontainer/cuda12.0ext-llvm14/devcontainer.json b/.devcontainer/cuda12.0ext-llvm14/devcontainer.json new file mode 100644 index 00000000000..deebd12ad31 --- /dev/null +++ b/.devcontainer/cuda12.0ext-llvm14/devcontainer.json @@ -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" +} diff --git a/.devcontainer/cuda12.6ext-gcc12/devcontainer.json b/.devcontainer/cuda12.6ext-gcc12/devcontainer.json new file mode 100644 index 00000000000..f3afa152724 --- /dev/null +++ b/.devcontainer/cuda12.6ext-gcc12/devcontainer.json @@ -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" +} diff --git a/.devcontainer/cuda12.6ext-llvm18/devcontainer.json b/.devcontainer/cuda12.6ext-llvm18/devcontainer.json new file mode 100644 index 00000000000..b19814ba1f7 --- /dev/null +++ b/.devcontainer/cuda12.6ext-llvm18/devcontainer.json @@ -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" +} diff --git a/ci/build_cudax.sh b/ci/build_cudax.sh index 2dff2549720..d640951b745 100755 --- a/ci/build_cudax.sh +++ b/ci/build_cudax.sh @@ -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 diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 2586fab09e6..b602061b299 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -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 @@ -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: @@ -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: @@ -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