|
32 | 32 | - all |
33 | 33 | - triton-main |
34 | 34 | - 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: '' |
35 | 45 | benchmark_parameters: |
36 | 46 | description: Extra parameters to pass to run-benchmark.sh (optional) |
37 | 47 | required: false |
@@ -169,16 +179,42 @@ jobs: |
169 | 179 | working-directory: triton-benchmarks/tritonbench |
170 | 180 | run: | |
171 | 181 | 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" |
175 | 196 | elif [ "${CONDA_ENV}" == "meta-triton" ]; then |
176 | | - CMD_SUFFIX="--meta-triton" |
| 197 | + TRITON_REPO="facebookexperimental/triton" |
177 | 198 | else |
178 | 199 | echo "unknown conda env: ${CONDA_ENV}" |
179 | 200 | exit 1 |
180 | 201 | 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} |
182 | 218 |
|
183 | 219 | - name: Run TritonBench |
184 | 220 | working-directory: triton-benchmarks/tritonbench |
|
0 commit comments