-
Notifications
You must be signed in to change notification settings - Fork 232
135 lines (122 loc) · 5.9 KB
/
ci.gpu.yml
File metadata and controls
135 lines (122 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: CI (GPU)
on:
push:
branches:
- main
- "pull-request/[0-9]+"
concurrency:
group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build-gpu:
if: github.repository == 'NVIDIA/stdexec'
name: GPU (${{ matrix.name }}, CUDA ${{ matrix.cuda }}, ${{ matrix.build }})
strategy:
fail-fast: false
matrix:
include:
- { name: "clang 21", cuda: "12.0", cxx: "clang++", build: "Release", tag: "llvm21-cuda12.0", gpu: "v100", sm: "70", driver: "latest", arch: "amd64" }
- { name: "clang 21", cuda: "12.9", cxx: "clang++", build: "Release", tag: "llvm21-cuda12.9", gpu: "v100", sm: "70", driver: "latest", arch: "amd64" }
- { name: "nvc++ 25.9", cuda: "12.9", cxx: "mpic++", build: "Release", tag: "nvhpc25.9", gpu: "l4", sm: "75", driver: "latest", arch: "amd64" }
- { name: "nvc++ 25.9", cuda: "12.9", cxx: "mpic++", build: "Debug", tag: "nvhpc25.9", gpu: "l4", sm: "75", driver: "latest", arch: "amd64" }
- { name: "nvc++ 25.11", cuda: "13.0", cxx: "mpic++", build: "Release", tag: "nvhpc25.11", gpu: "l4", sm: "75", driver: "latest", arch: "amd64" }
- { name: "nvc++ 25.11", cuda: "13.0", cxx: "mpic++", build: "Debug", tag: "nvhpc25.11", gpu: "l4", sm: "75", driver: "latest", arch: "amd64" }
runs-on: linux-${{ matrix.arch }}-gpu-${{ matrix.gpu }}-${{ matrix.driver }}-1
container:
options: -u root
image: rapidsai/devcontainers:26.02-cpp-${{ matrix.tag }}
env:
NVIDIA_VISIBLE_DEVICES: "${{ env.NVIDIA_VISIBLE_DEVICES }}"
permissions:
id-token: write # This is required for configure-aws-credentials
contents: read # This is required for actions/checkout
defaults:
run:
shell: su coder {0}
working-directory: /home/coder
steps:
- name: Run nvidia-smi to make sure GPU is working
run: nvidia-smi
- name: Checkout stdexec
uses: actions/checkout@v4
with:
path: stdexec
persist-credentials: false
- name: Setup environment
run: |
echo "ARTIFACT_PREFIX=${{runner.os}}-cuda${{matrix.cuda}}-${{matrix.tag}}-${{matrix.arch}}" >> "${GITHUB_ENV}"
echo "ARTIFACT_SUFFIX=${{github.run_id}}-${{github.run_attempt}}-$RANDOM" >> "${GITHUB_ENV}"
- if: github.repository_owner == 'NVIDIA'
name: Get AWS credentials for sccache bucket
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-duration-seconds: 28800 # 8 hours
role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-NVIDIA
- name: Build and test GPU schedulers
env:
NVCC_APPEND_FLAGS: "-t=100"
SCCACHE_BUCKET: "rapids-sccache-devs"
SCCACHE_DIST_REQUEST_TIMEOUT: "7140"
SCCACHE_DIST_URL: "https://${{ matrix.arch }}.linux.sccache.rapids.nvidia.com"
SCCACHE_IDLE_TIMEOUT: "0"
SCCACHE_REGION: "us-east-2"
SCCACHE_S3_KEY_PREFIX: "nvidia-stdexec-dev"
SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX: "nvidia-stdexec-dev/preprocessor"
SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE: "true"
SCCACHE_SERVER_LOG: "sccache=debug"
SCCACHE_SERVER_PORT: "4225"
run: |
set -e;
source /etc/profile
set -x;
devcontainer-utils-install-sccache --version rapids;
devcontainer-utils-init-sccache-dist \
--enable-sccache-dist - <<< " \
--auth-type 'token' \
--auth-token '$( \
curl -fsSL -H "Authorization: Bearer $( \
curl -fsSL -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=token.rapids.nvidia.com" \
| jq -r '.value' \
)" https://token.rapids.nvidia.com/gh/token/exchange \
| jq -r '.token')' \
";
# Copy source folder into ~/stdexec
cp -r "${GITHUB_WORKSPACE}"/stdexec ~/;
chown -R coder:coder ~/stdexec;
cd ~/stdexec;
# Configure
cmake -S . -B build -GNinja \
-DSTDEXEC_ENABLE_CUDA=ON \
-DSTDEXEC_ENABLE_IO_URING=OFF \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CUDA_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CUDA_ARCHITECTURES=${{ matrix.sm }} \
;
# Compile
cmake --build build -v -j 512;
# Print sccache stats
sccache -s;
# Tests
SCCACHE_NO_CACHE=1 SCCACHE_NO_DIST_COMPILE=1 \
ctest --test-dir build --verbose --output-on-failure --timeout 60;
# Examples
./build/examples/nvexec/maxwell_cpu_st --iterations=1000 --N=512 --run-cpp --run-inline-scheduler;
./build/examples/nvexec/maxwell_cpu_mt --iterations=1000 --N=512 --run-std --run-stdpar --run-thread-pool-scheduler;
./build/examples/nvexec/maxwell_gpu_s --iterations=1000 --N=512 --run-cuda --run-stdpar --run-stream-scheduler;
- if: ${{ !cancelled() }}
name: Upload sccache logs
uses: actions/upload-artifact@v4
with:
name: sccache-client-logs-${{env.ARTIFACT_PREFIX}}-${{env.ARTIFACT_SUFFIX}}
path: /tmp/sccache*.log
compression-level: 9
ci-gpu:
runs-on: ubuntu-latest
name: CI (GPU)
needs:
- build-gpu
steps:
- run: echo "CI (GPU) success"