Skip to content

Commit 6c389fd

Browse files
Fix multiple triton-kernels-benchmark bug (#3164)
Before this PR different versions of `triton-kernels-benchmark` can coexist, which is an unexpected/incorrect behavior. And it is possible that the old version has a hash that is lexicographically higher in the sort, which causes the old version to be unexpectedly used. More details can be found here: pypa/pip#12330 Signed-off-by: Whitney Tsang <[email protected]>
1 parent 26d4f55 commit 6c389fd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/triton-benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
id: install
114114
run: |
115115
cd benchmarks
116-
python setup.py install
116+
pip install .
117117
118118
- name: Run Triton Softmax kernel benchmark
119119
if: ${{ steps.install.outcome == 'success' && !cancelled() && !contains(fromJson(inputs.skip_benchmarks || '[]'), 'fused_softmax.py') }}

scripts/test-triton.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ run_benchmark_softmax() {
261261
echo "***** Running Softmax *****"
262262
echo "****************************************************"
263263
cd $TRITON_PROJ/benchmarks
264-
python setup.py install
264+
pip install .
265265
python $TRITON_PROJ/benchmarks/triton_kernels_benchmark/fused_softmax.py
266266
}
267267

@@ -270,7 +270,7 @@ run_benchmark_gemm() {
270270
echo "***** Running GEMM *****"
271271
echo "****************************************************"
272272
cd $TRITON_PROJ/benchmarks
273-
python setup.py install
273+
pip install .
274274

275275
echo "Default path:"
276276
python $TRITON_PROJ/benchmarks/triton_kernels_benchmark/gemm_benchmark.py
@@ -287,7 +287,7 @@ run_benchmark_attention() {
287287
echo "***** Running ATTENTION *****"
288288
echo "****************************************************"
289289
cd $TRITON_PROJ/benchmarks
290-
python setup.py install
290+
pip install .
291291

292292
echo "Forward - Default path:"
293293
python $TRITON_PROJ/benchmarks/triton_kernels_benchmark/flash_attention_benchmark.py
@@ -305,7 +305,7 @@ run_benchmark_attention() {
305305

306306
run_benchmarks() {
307307
cd $TRITON_PROJ/benchmarks
308-
python setup.py install
308+
pip install .
309309
for file in $TRITON_PROJ/benchmarks/triton_kernels_benchmark/*.py; do
310310
benchmark=$(basename -- "$file" .py)
311311
if [[ $benchmark = @("__init__"|"benchmark_driver"|"benchmark_testing") ]]; then

0 commit comments

Comments
 (0)