Skip to content

Commit 9a3f482

Browse files
committed
ci(docs): run all docs on cpu runners
1 parent cfc8c09 commit 9a3f482

File tree

2 files changed

+92
-91
lines changed

2 files changed

+92
-91
lines changed

.github/workflows/Documentation.yml

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -33,89 +33,89 @@ concurrency:
3333
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
3434

3535
jobs:
36-
tutorial-cuda:
37-
if: ${{ !contains(github.event.head_commit.message, '[skip docs]') }}
38-
runs-on: ubuntu-latest
39-
steps:
40-
- name: Trigger CUDA Tutorial Build
41-
id: buildkite-build
42-
uses: buildkite/trigger-pipeline-action@v2.4.1
43-
with:
44-
buildkite_api_access_token: ${{ secrets.BUILDKITE_TOKEN }}
45-
pipeline: "julialang/lux-dot-jl"
46-
commit: ${{ github.event.pull_request.head.sha }}
47-
branch: ${{ github.event.pull_request.head.ref }}
48-
message: |
49-
Triggered from PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}
50-
send_pull_request: true
51-
pull_request_base_branch: ${{ github.event.pull_request.base.ref }}
52-
build_env_vars: >-
53-
{
54-
"LUX_CUDA_TUTORIALS": "1",
55-
"GITHUB_PR_NUMBER": "${{ github.event.pull_request.number }}"
56-
}
57-
58-
- name: Download CUDA Tutorial Artifacts
59-
uses: EnricoMi/download-buildkite-artifact-action@v1
60-
with:
61-
buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}
62-
buildkite_build_url: ${{ steps.buildkite-build.outputs.url }}
63-
ignore_build_states: blocked,canceled,skipped,not_run
64-
ignore_job_states: timed_out,failed
65-
output_path: artifacts
66-
poll_interval: 30
67-
68-
- name: "Combine CUDA Tutorial Artifacts"
69-
run: |
70-
set -e
71-
72-
SOURCE_DIR="artifacts"
73-
OUTPUT_DIR="artifacts_combined"
74-
75-
mkdir -p "$OUTPUT_DIR"
76-
77-
# Check if source directory exists
78-
if [ ! -d "$SOURCE_DIR" ]; then
79-
echo "Error: Source directory '$SOURCE_DIR' not found"
80-
exit 1
81-
fi
82-
83-
BUILD_DIRS=$(find "$SOURCE_DIR" -mindepth 1 -type d -name "Tutorial-Build-*")
84-
85-
[ -n "$BUILD_DIRS" ] || { echo "Error: No Tutorial-Build directories found"; exit 1; }
86-
87-
echo "$BUILD_DIRS" | while read dir; do
88-
echo "Processing: $dir"
89-
rsync -av --ignore-existing "$dir/" "$OUTPUT_DIR/"
90-
done
91-
92-
# Verify
93-
[ "$(ls -A $OUTPUT_DIR)" ] || { echo "Error: Merge produced empty directory"; exit 1; }
94-
95-
echo "✓ Merge complete!"
96-
shell: bash
97-
98-
- name: Upload Tutorial Artifacts
99-
uses: actions/upload-artifact@v5
100-
with:
101-
name: "tutorial-cuda"
102-
path: |
103-
artifacts_combined/docs/src/tutorials/beginner/**/*
104-
artifacts_combined/docs/src/tutorials/intermediate/**/*
105-
artifacts_combined/docs/src/tutorials/advanced/**/*
106-
artifacts_combined/tutorial_deps/*
107-
artifacts_combined/**/*.cov
108-
artifacts_combined/docs/src/public/examples/**/*
109-
retention-days: 90
110-
if-no-files-found: error
36+
# tutorial-cuda:
37+
# if: ${{ !contains(github.event.head_commit.message, '[skip docs]') }}
38+
# runs-on: ubuntu-latest
39+
# steps:
40+
# - name: Trigger CUDA Tutorial Build
41+
# id: buildkite-build
42+
# uses: buildkite/trigger-pipeline-action@v2.4.1
43+
# with:
44+
# buildkite_api_access_token: ${{ secrets.BUILDKITE_TOKEN }}
45+
# pipeline: "julialang/lux-dot-jl"
46+
# commit: ${{ github.event.pull_request.head.sha }}
47+
# branch: ${{ github.event.pull_request.head.ref }}
48+
# message: |
49+
# Triggered from PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}
50+
# send_pull_request: true
51+
# pull_request_base_branch: ${{ github.event.pull_request.base.ref }}
52+
# build_env_vars: >-
53+
# {
54+
# "LUX_CUDA_TUTORIALS": "1",
55+
# "GITHUB_PR_NUMBER": "${{ github.event.pull_request.number }}"
56+
# }
57+
58+
# - name: Download CUDA Tutorial Artifacts
59+
# uses: EnricoMi/download-buildkite-artifact-action@v1
60+
# with:
61+
# buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}
62+
# buildkite_build_url: ${{ steps.buildkite-build.outputs.url }}
63+
# ignore_build_states: blocked,canceled,skipped,not_run
64+
# ignore_job_states: timed_out,failed
65+
# output_path: artifacts
66+
# poll_interval: 30
67+
68+
# - name: "Combine CUDA Tutorial Artifacts"
69+
# run: |
70+
# set -e
71+
72+
# SOURCE_DIR="artifacts"
73+
# OUTPUT_DIR="artifacts_combined"
74+
75+
# mkdir -p "$OUTPUT_DIR"
76+
77+
# # Check if source directory exists
78+
# if [ ! -d "$SOURCE_DIR" ]; then
79+
# echo "Error: Source directory '$SOURCE_DIR' not found"
80+
# exit 1
81+
# fi
82+
83+
# BUILD_DIRS=$(find "$SOURCE_DIR" -mindepth 1 -type d -name "Tutorial-Build-*")
84+
85+
# [ -n "$BUILD_DIRS" ] || { echo "Error: No Tutorial-Build directories found"; exit 1; }
86+
87+
# echo "$BUILD_DIRS" | while read dir; do
88+
# echo "Processing: $dir"
89+
# rsync -av --ignore-existing "$dir/" "$OUTPUT_DIR/"
90+
# done
91+
92+
# # Verify
93+
# [ "$(ls -A $OUTPUT_DIR)" ] || { echo "Error: Merge produced empty directory"; exit 1; }
94+
95+
# echo "✓ Merge complete!"
96+
# shell: bash
97+
98+
# - name: Upload Tutorial Artifacts
99+
# uses: actions/upload-artifact@v5
100+
# with:
101+
# name: "tutorial-cuda"
102+
# path: |
103+
# artifacts_combined/docs/src/tutorials/beginner/**/*
104+
# artifacts_combined/docs/src/tutorials/intermediate/**/*
105+
# artifacts_combined/docs/src/tutorials/advanced/**/*
106+
# artifacts_combined/tutorial_deps/*
107+
# artifacts_combined/**/*.cov
108+
# artifacts_combined/docs/src/public/examples/**/*
109+
# retention-days: 90
110+
# if-no-files-found: error
111111

112112
tutorial-cpu:
113113
if: ${{ !contains(github.event.head_commit.message, '[skip docs]') }}
114114
runs-on: ubuntu-latest
115115
strategy:
116116
fail-fast: false
117117
matrix:
118-
group: [0, 1, 2, 3]
118+
group: [0, 1, 2, 3, 4, 5]
119119
steps:
120120
- uses: actions/checkout@v6
121121
- name: Collect Workflow Telemetry
@@ -133,7 +133,7 @@ jobs:
133133
run: julia --color=yes --project=docs --threads=auto docs/tutorials.jl
134134
env:
135135
TUTORIAL_BACKEND_GROUP: "CPU"
136-
BUILDKITE_PARALLEL_JOB_COUNT: 4
136+
BUILDKITE_PARALLEL_JOB_COUNT: 6
137137
BUILDKITE_PARALLEL_JOB: ${{ matrix.group }}
138138
LD_LIBRARY_PATH: ""
139139
- name: Upload Tutorial Artifacts
@@ -153,7 +153,8 @@ jobs:
153153
documentation:
154154
if: ${{ !contains(github.event.head_commit.message, '[skip docs]') }}
155155
runs-on: ubuntu-latest
156-
needs: [tutorial-cpu, tutorial-cuda]
156+
# needs: [tutorial-cpu, tutorial-cuda]
157+
needs: [tutorial-cpu]
157158
steps:
158159
- uses: actions/checkout@v6
159160
with:

docs/tutorials.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#! format: off
22
const BEGINNER_TUTORIALS = [
3-
# tutorial name device should_run?
4-
("Basics", "CPU", true),
5-
("PolynomialFitting", "CUDA", true),
6-
("SimpleRNN", "CUDA", true),
7-
("SimpleChains", "CUDA", false),
8-
("OptimizationIntegration", "CPU", true),
3+
# tutorial name device should_run?
4+
("Basics", "CPU", true),
5+
("PolynomialFitting", "CPU", true),
6+
("SimpleRNN", "CPU", true),
7+
("SimpleChains", "CPU", false),
8+
("OptimizationIntegration", "CPU", true),
99
]
1010
const INTERMEDIATE_TUTORIALS = [
11-
("NeuralODE", "CUDA", false),
11+
("NeuralODE", "CPU", false),
1212
("BayesianNN", "CPU", false),
13-
("HyperNet", "CUDA", true),
14-
("PINN2DPDE", "CUDA", true),
15-
("ConvolutionalVAE", "CUDA", true),
16-
("GCN_Cora", "CUDA", true),
13+
("HyperNet", "CPU", true),
14+
("PINN2DPDE", "CPU", true),
15+
("ConvolutionalVAE", "CPU", true),
16+
("GCN_Cora", "CPU", true),
1717
("RealNVP", "CPU", false),
1818
("LSTMEncoderDecoder", "CPU", true),
1919
("CIFAR10/conv_mixer.jl", "CPU", false),
20-
("CIFAR10/simple_cnn.jl", "CUDA", false),
20+
("CIFAR10/simple_cnn.jl", "CPU", false),
2121
("CIFAR10/resnet20.jl", "CPU", false),
2222
]
2323
const ADVANCED_TUTORIALS = [
@@ -112,7 +112,7 @@ asyncmap(TUTORIALS_BUILDING; ntasks=NTASKS) do (i, (d, (input_path, should_run))
112112

113113
withenv(
114114
"JULIA_NUM_THREADS" => "$(Threads.nthreads())",
115-
"JULIA_CUDA_HARD_MEMORY_LIMIT" => "$(100 ÷ NTASKS)%",
115+
"JULIA_CPU_HARD_MEMORY_LIMIT" => "$(100 ÷ NTASKS)%",
116116
"JULIA_PKG_PRECOMPILE_AUTO" => "0",
117117
"JULIA_DEBUG" => "Literate",
118118
) do

0 commit comments

Comments
 (0)