Skip to content
10 changes: 7 additions & 3 deletions mlir/utils/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,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: "ggtuning", poll: false, url: 'https://github.com/ROCm/MITuna.git'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remember to change this once ROCm/MITuna#1020 is merged.

}
dir('build') {
timeout(time: 60, activity: true, unit: 'MINUTES') {
Expand Down Expand Up @@ -1094,14 +1094,14 @@ 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: "ggtuning", poll: false, url: 'https://github.com/ROCm/MITuna.git'
}
dir('build') {
def tuningLog = "tune_rocmlir_${CHIP}.log"
sh """echo "=== Tuning rocMLIR for ${CHIP} ===" | tee ${tuningLog}"""
// Tune gemms with default datatypes, fail if the DB is not created
// (Includes int8xint8->int8 for performance comparisons against CK.)
sh """../mlir/utils/tuna/tuna-script.sh -o gemm \
sh """../mlir/utils/tuna/tuna-script.sh -o gemm \
-c ../mlir/utils/performance/configs/tier1-gemm-configs \
-t ${WORKSPACE}/MITuna -f mlir_tuning_${CHIP}.tsv 2>&1 | tee -a ${tuningLog}
[ -f mlir_tuning_${CHIP}.tsv ]"""
Expand Down Expand Up @@ -1150,6 +1150,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 \
Expand Down
8 changes: 6 additions & 2 deletions mlir/utils/tuna/tuna-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
Expand Down Expand Up @@ -110,8 +114,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}"
Expand Down