Skip to content

Commit 49fa451

Browse files
authored
[tritonbench] use the new setup-env.sh (#177)
1 parent f63edc9 commit 49fa451

1 file changed

Lines changed: 21 additions & 34 deletions

File tree

.github/workflows/tritonbench.yml

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
UV_VENV_DIR: "/workspace/uv_venvs"
104104
CONDA_ENV: ${{ matrix.triton_channel }}
105105
TRITONBENCH_SCRIBE_GRAPHQL_ACCESS_TOKEN: ${{ secrets.TRITONBENCH_SCRIBE_GRAPHQL_ACCESS_TOKEN }}
106-
JOB_NAME: tritonbench-${{ matrix.runner }}-benchmark-${{ matrix.triton_channel }}--periodic-${{ matrix.benchmarks }}
106+
JOB_NAME: tritonbench-${{ matrix.runner }}-benchmark-${{ matrix.triton_channel }}-periodic-${{ matrix.benchmarks }}
107107
RUNNER_TYPE: ${{ matrix.runner }}
108108
environment: pytorch-x-vllm
109109
permissions:
@@ -128,6 +128,14 @@ jobs:
128128
submodules: recursive
129129
fetch-depth: 0
130130

131+
- name: Checkout Triton
132+
uses: actions/checkout@v4
133+
with:
134+
repository: ${{ inputs.triton_repo || (matrix.triton_channel == 'meta-triton' && 'facebookexperimental/triton' || 'triton-lang/triton') }}
135+
path: triton-benchmarks/triton
136+
ref: ${{ inputs.triton_commit || 'main' }}
137+
submodules: recursive
138+
131139
- uses: actions/setup-python@v5
132140
# Amazon Linux fails on this step
133141
continue-on-error: true
@@ -175,46 +183,25 @@ jobs:
175183
set -eux
176184
pip install --group ci
177185
178-
- name: Install TritonBench
179-
working-directory: triton-benchmarks/tritonbench
180-
run: |
181-
set -eux
182-
bash ./.ci/tritonbench/setup-env.sh --cuda
183-
184-
- name: Compile Triton
186+
- name: Install TritonBench and Build Triton
185187
working-directory: triton-benchmarks/tritonbench
186188
env:
187-
INPUT_TRITON_REPO: ${{ inputs.triton_repo || '' }}
188-
INPUT_TRITON_COMMIT: ${{ inputs.triton_commit || '' }}
189+
MAX_JOBS: 16
189190
run: |
190191
set -eux
191192
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"
196-
elif [ "${CONDA_ENV}" == "meta-triton" ]; then
197-
TRITON_REPO="facebookexperimental/triton"
198-
else
199-
echo "unknown conda env: ${CONDA_ENV}"
200-
exit 1
201-
fi
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"
193+
# If running in nightly environment
194+
# Check out the "nightly" commit
195+
if [ -z ${{ inputs.triton_repo }} ] && \
196+
[ -z ${{ inputs.triton_commit }} ]; then
197+
. ./.ci/triton/triton_install_utils.sh
198+
checkout_triton main \
199+
"${GITHUB_WORKSPACE}/triton-benchmarks/triton" \
200+
"1"
209201
fi
210202
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}
203+
bash ./.ci/tritonbench/setup-env.sh --cuda \
204+
--custom-triton ${GITHUB_WORKSPACE}/triton-benchmarks/triton
218205
219206
- name: Run TritonBench
220207
working-directory: triton-benchmarks/tritonbench

0 commit comments

Comments
 (0)