mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-21 13:29:20 +00:00
Add full QA with verification option, few other changes. (#331)
* add verify flag and update scripts
* replace old check_error function with the new check_err
* fix syntax
* remove blank spaces
* remove empty line
* add check_err for tensors
* fix syntax
* replace tensors with vectors in check_err calls
* fix syntax
* remove blank spaces
* fix syntax
* add new line at end of file
* disable conv2d_bwd_weight test, add gpu check
* set check_gpu using export
* check GPU using runShell
* add definition of runShell
* fix script syntax
* reduce the number of threads, add full qa option
* run processing scripts in bash
* fix the branch and host names in performance scripts, add chronos
* replace parameterizedCron with cron
* archive the perf log files
* try to fix git call
* pass branch and host names as arguments into scripts
* fix script arguments
* fix script arguments
* process results on master
* fix pipeline
* add definition of gpu_arch
* run processing scripts in docker
* fix the brackets
* add agent master for the processing stage
* get rid of show_node_info call on master
* try using mici label instead of master, disable MI100 tests for now
* fix syntax
* simplify container for results processing
* remove node(master) from the process_results stage
* put all stages in original order
* change the agent label from master to mici for gfx908
[ROCm/composable_kernel commit: d8415a96b3]
This commit is contained in:
@@ -1,59 +1,62 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# in order to run this script you'd first need to build the ckProfiler executable in ../build/bin/
|
||||
# and make sure the following python packages are installed in your environment:
|
||||
# run the script as "./run_performance_tests.sh <verification> <tag for your test environment> <gpu_arch> <branch name> < node name>
|
||||
# input arguments:
|
||||
# verification = 0 : do not verify result correctness on CPU
|
||||
# = 1 : verify correctness on CPU (may take a long time)
|
||||
# environment tag : a string describing the specifics of your test environment
|
||||
# gpu_arch : a string for GPU architecture, e.g. "gfx908" or "gfx90a".
|
||||
# branch name : name of the branch in git repo (git status | grep -e 'On branch')
|
||||
# node name : $hostname
|
||||
|
||||
pip3 install --upgrade pip
|
||||
pip3 install sqlalchemy pymysql pandas sshtunnel
|
||||
|
||||
# you would also need to set up some environment variables in order to
|
||||
# post your new test results to the database and compare them to the baseline
|
||||
# please contact Illia.Silin@amd.com for more details
|
||||
#
|
||||
# run the script as "./run_performance_tests.sh <tag for your test environment>
|
||||
|
||||
#get the test environment type:
|
||||
export env_type=$1
|
||||
echo 'Environment type ' $env_type
|
||||
#get the command line arguments:
|
||||
export verify=$1
|
||||
echo 'Verification: ' $verify
|
||||
export env_type=$2
|
||||
echo 'Environment type: ' $env_type
|
||||
export gpu_arch=$3
|
||||
echo 'GPU architecture: ' $gpu_arch
|
||||
export branch=$4
|
||||
echo 'Branch name: ' $branch
|
||||
export host_name=$5
|
||||
echo 'Host name: ' $host_name
|
||||
|
||||
function print_log_header(){
|
||||
rm -f $1;
|
||||
git status | grep -e 'On branch' > $1;
|
||||
echo -n 'Node name: ' >>$1; hostname >> $1;
|
||||
echo 'On branch ' $3 &> $1;
|
||||
echo 'Node name: ' $4 >> $1;
|
||||
#get GPU_arch and number of compute units from rocminfo
|
||||
echo -n "GPU_arch: " >> $1; rocminfo | grep "Name:" | grep "gfx" >> $1;
|
||||
rocminfo | grep "Compute Unit:" >> $1;
|
||||
hipcc --version | grep -e 'HIP version' >> $1;
|
||||
echo 'Environment type: ' $2 >>$1;
|
||||
echo 'Environment type: ' $2 >> $1;
|
||||
/opt/rocm/bin/amdclang++ --version | grep -e 'InstalledDir' >> $1;
|
||||
}
|
||||
#run gemm tests
|
||||
export gemm_log="perf_gemm.log"
|
||||
print_log_header $gemm_log $env_type
|
||||
./profile_gemm.sh gemm 0 0 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 0 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 0 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 0 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 0 1 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 1 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 1 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 1 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 0 2 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 2 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 2 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 2 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 0 3 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 3 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 3 0 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 3 0 1 0 5 | tee -a $gemm_log
|
||||
python3 process_perf_data.py $gemm_log
|
||||
export gemm_log="perf_gemm_${gpu_arch}.log"
|
||||
print_log_header $gemm_log $env_type $branch $host_name
|
||||
./profile_gemm.sh gemm 0 0 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 0 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 0 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 0 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 0 1 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 1 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 1 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 1 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 0 2 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 2 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 2 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 2 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 0 3 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 1 3 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 2 3 $verify 1 0 5 | tee -a $gemm_log
|
||||
./profile_gemm.sh gemm 3 3 $verify 1 0 5 | tee -a $gemm_log
|
||||
|
||||
#run resnet50 test
|
||||
export resnet256_log="perf_resnet50_N256.log"
|
||||
print_log_header $resnet256_log $env_type
|
||||
./profile_resnet50.sh conv_fwd_bias_relu 1 1 1 1 0 2 0 1 256 | tee -a $resnet256_log
|
||||
python3 process_perf_data.py $resnet256_log
|
||||
export resnet4_log="perf_resnet50_N4.log"
|
||||
print_log_header $resnet4_log $env_type
|
||||
./profile_resnet50.sh conv_fwd_bias_relu 1 1 1 1 0 2 0 1 4 | tee -a $resnet4_log
|
||||
python3 process_perf_data.py $resnet4_log
|
||||
export resnet256_log="perf_resnet50_N256_${gpu_arch}.log"
|
||||
print_log_header $resnet256_log $env_type $branch $host_name
|
||||
./profile_resnet50.sh conv_fwd_bias_relu 1 1 1 1 $verify 2 0 1 256 | tee -a $resnet256_log
|
||||
export resnet4_log="perf_resnet50_N4_${gpu_arch}.log"
|
||||
print_log_header $resnet4_log $env_type $branch $host_name
|
||||
./profile_resnet50.sh conv_fwd_bias_relu 1 1 1 1 $verify 2 0 1 4 | tee -a $resnet4_log
|
||||
|
||||
Reference in New Issue
Block a user