Skip to content

Commit 8962501

Browse files
committed
add branch and singe side test
1 parent cb41a2b commit 8962501

1 file changed

Lines changed: 41 additions & 5 deletions

File tree

.github/workflows/tritonbench.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ on:
3232
- all
3333
- triton-main
3434
- meta-triton
35+
triton_repo:
36+
description: Triton repo to build from (optional)
37+
required: false
38+
type: string
39+
default: ''
40+
triton_commit:
41+
description: Triton commit or ref to build from (optional)
42+
required: false
43+
type: string
44+
default: ''
3545
benchmark_parameters:
3646
description: Extra parameters to pass to run-benchmark.sh (optional)
3747
required: false
@@ -169,16 +179,42 @@ jobs:
169179
working-directory: triton-benchmarks/tritonbench
170180
run: |
171181
set -eux
172-
# Use MAX_JOBS=16 to avoid OOM compiling Triton
173-
if [ "${CONDA_ENV}" == "triton-main" ]; then
174-
CMD_SUFFIX="--triton-main"
182+
bash ./.ci/tritonbench/setup-env.sh --cuda
183+
184+
- name: Compile Triton
185+
working-directory: triton-benchmarks/tritonbench
186+
env:
187+
INPUT_TRITON_REPO: ${{ inputs.triton_repo || '' }}
188+
INPUT_TRITON_COMMIT: ${{ inputs.triton_commit || '' }}
189+
run: |
190+
set -eux
191+
192+
if [ -n "${INPUT_TRITON_REPO}" ]; then
193+
TRITON_REPO="${INPUT_TRITON_REPO}"
194+
elif [ "${CONDA_ENV}" == "triton-main" ]; then
195+
TRITON_REPO="triton-lang/triton"
175196
elif [ "${CONDA_ENV}" == "meta-triton" ]; then
176-
CMD_SUFFIX="--meta-triton"
197+
TRITON_REPO="facebookexperimental/triton"
177198
else
178199
echo "unknown conda env: ${CONDA_ENV}"
179200
exit 1
180201
fi
181-
MAX_JOBS=16 bash ./.ci/tritonbench/setup-env.sh --cuda ${CMD_SUFFIX}
202+
203+
if [ -n "${INPUT_TRITON_COMMIT}" ]; then
204+
TRITON_COMMIT="${INPUT_TRITON_COMMIT}"
205+
NIGHTLY_FLAG=""
206+
else
207+
TRITON_COMMIT="main"
208+
NIGHTLY_FLAG="--nightly"
209+
fi
210+
211+
MAX_JOBS=16 bash ./.ci/triton/install.sh \
212+
--conda-env "${CONDA_ENV}" \
213+
--repo "${TRITON_REPO}" \
214+
--commit "${TRITON_COMMIT}" \
215+
--side single \
216+
--install-dir "${WORKSPACE_DIR}/${CONDA_ENV}" \
217+
${NIGHTLY_FLAG}
182218
183219
- name: Run TritonBench
184220
working-directory: triton-benchmarks/tritonbench

0 commit comments

Comments
 (0)