From fad4316eda08ddc825a97e8461da0bf2dbf54a74 Mon Sep 17 00:00:00 2001 From: Djordje Antic Date: Wed, 17 Dec 2025 04:29:09 -0500 Subject: [PATCH 1/4] Initial commit --- mlir/utils/jenkins/Jenkinsfile | 4 ++++ mlir/utils/tuna/tuna-script.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mlir/utils/jenkins/Jenkinsfile b/mlir/utils/jenkins/Jenkinsfile index f4c1baa6c5ef..ed5d37d98663 100644 --- a/mlir/utils/jenkins/Jenkinsfile +++ b/mlir/utils/jenkins/Jenkinsfile @@ -1141,6 +1141,10 @@ PY sh """../mlir/utils/tuna/tuna-script.sh -o attention \ -c ${attnConfigToUse} \ -t ${WORKSPACE}/MITuna -f mlir_tuning_${CHIP}.tsv 2>&1 | tee -a ${tuningLog}""" + // Tune gemm_gemm configs + sh """../mlir/utils/tuna/tuna-script.sh -o gemm_gemm \ + -c ../mlir/utils/performance/configs/tier1-gemmgemm-configs \ + -t ${WORKSPACE}/MITuna -f mlir_tuning_${CHIP}.tsv 2>&1 | tee -a ${tuningLog}""" // Tune gemms with default datatypes, fail if the DB is not created (quick tuning) // (Includes int8xint8->int8 for performance comparisons against CK.) sh """../mlir/utils/tuna/tuna-script.sh -o gemm \ diff --git a/mlir/utils/tuna/tuna-script.sh b/mlir/utils/tuna/tuna-script.sh index cd966654a079..4493c83fb9fa 100755 --- a/mlir/utils/tuna/tuna-script.sh +++ b/mlir/utils/tuna/tuna-script.sh @@ -110,8 +110,8 @@ while getopts ":hc:t:r:f:o:s:l:" arg; do case $arg in o) # Operation (convolution or gemm [default convolution]) OP=${OPTARG} - [ "$OP" = "convolution" ] || [ "$OP" = "gemm" ] || [ "$OP" = "attention" ] \ - || echo "Operation needs to be 'convolution', 'gemm', or 'attention'." + [ "$OP" = "convolution" ] || [ "$OP" = "gemm" ] || [ "$OP" = "attention" ] || [ "$OP" = "gemm_gemm" ] \ + || echo "Operation needs to be 'convolution', 'gemm', 'attention', or 'gemm_gemm'." ;; c) # Configs file CONFIGS_FILE="${OPTARG}" From 85418eae2d34bb29b01af0d1f53427e403e9e127 Mon Sep 17 00:00:00 2001 From: Djordje Antic Date: Wed, 17 Dec 2025 12:30:14 +0000 Subject: [PATCH 2/4] Use tune-gemmgemm MITuna branch --- mlir/utils/jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/utils/jenkins/Jenkinsfile b/mlir/utils/jenkins/Jenkinsfile index ed5d37d98663..472ed695bbc2 100644 --- a/mlir/utils/jenkins/Jenkinsfile +++ b/mlir/utils/jenkins/Jenkinsfile @@ -869,7 +869,7 @@ pipeline { buildProject('ci-performance-scripts', '') // How to check out into specific directory, according to stackoverflow. dir('MITuna') { - git branch: "pf-tuna-rocmlir-3", poll: false, url: 'https://github.com/ROCm/MITuna.git' + git branch: "tune-gemmgemm", poll: false, url: 'https://github.com/ROCm/MITuna.git' } dir('build') { timeout(time: 60, activity: true, unit: 'MINUTES') { @@ -1085,7 +1085,7 @@ pipeline { stage("Tune rocMLIR") { buildProject('check-rocmlir-build-only ci-performance-scripts', '') dir('MITuna') { - git branch: "pf-tuna-rocmlir-3", poll: false, url: 'https://github.com/ROCm/MITuna.git' + git branch: "tune-gemmgemm", poll: false, url: 'https://github.com/ROCm/MITuna.git' } dir('build') { def tuningLog = "tune_rocmlir_${CHIP}.log" From db6e9ad58a84e657547ba2c169d1463ebcb7ca36 Mon Sep 17 00:00:00 2001 From: Djordje Antic Date: Wed, 17 Dec 2025 14:47:19 +0100 Subject: [PATCH 3/4] Update Jenkinsfile --- mlir/utils/jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/utils/jenkins/Jenkinsfile b/mlir/utils/jenkins/Jenkinsfile index 472ed695bbc2..5f8484708753 100644 --- a/mlir/utils/jenkins/Jenkinsfile +++ b/mlir/utils/jenkins/Jenkinsfile @@ -869,7 +869,7 @@ pipeline { buildProject('ci-performance-scripts', '') // How to check out into specific directory, according to stackoverflow. dir('MITuna') { - git branch: "tune-gemmgemm", poll: false, url: 'https://github.com/ROCm/MITuna.git' + git branch: "ggtuning", poll: false, url: 'https://github.com/ROCm/MITuna.git' } dir('build') { timeout(time: 60, activity: true, unit: 'MINUTES') { @@ -1085,7 +1085,7 @@ pipeline { stage("Tune rocMLIR") { buildProject('check-rocmlir-build-only ci-performance-scripts', '') dir('MITuna') { - git branch: "tune-gemmgemm", poll: false, url: 'https://github.com/ROCm/MITuna.git' + git branch: "ggtuning", poll: false, url: 'https://github.com/ROCm/MITuna.git' } dir('build') { def tuningLog = "tune_rocmlir_${CHIP}.log" From 722b5d72e9c83d36e6b99475245c147f18be088b Mon Sep 17 00:00:00 2001 From: Djordje Antic Date: Mon, 22 Dec 2025 10:16:42 +0000 Subject: [PATCH 4/4] Add support for gemm_gemm tablekind in clear_tables function in tuna-script.sh --- mlir/utils/tuna/tuna-script.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mlir/utils/tuna/tuna-script.sh b/mlir/utils/tuna/tuna-script.sh index 4493c83fb9fa..2edd0b2825df 100755 --- a/mlir/utils/tuna/tuna-script.sh +++ b/mlir/utils/tuna/tuna-script.sh @@ -38,6 +38,10 @@ function clear_tables tablekind="conv" fi + if [ "$tablekind" = "gemm_gemm" ]; then + tablekind="gemmgemm" + fi + # config table has foreign keys from job and results tables. however, # config table doesn't have a session column so we must delete them all. mysql --user root --database tuna -e "delete from rocmlir_${tablekind}_results;"