AMD GPU Benchmark without Docker
Pre Required :
ubuntu 22.04
python 3.10.6
Reference :https://rocm.docs.amd.com/en/latest/how_to/tensorflow_install/tensorflow_install.html#../../deploy/linux/install.md
Install python pip and rocm package :sudo apt install python3-pip
sudo apt install rocm-libs rccl
Use Virtual Environment:sudo pip3 install virtualenv
virtualenv psi-venv
source psi-venv/bin/activate
Install tensor flow, tesorflow-rocm and protobuf
pip install tensorflow=2.12
pip install tensorflow-rocm==2.12.0.560 –upgrade
pip install protobuf==3.20.3
Verify Python is Running :
python3 -c ‘import tensorflow’ 2> /dev/null && echo ‘Success’ || echo ‘Failure’
Success
Verify Tensorflow is Running :
python3 -c ‘import tensorflow’ 2> /dev/null && echo ‘Success’ || echo ‘Failure’
‘Success’
Run Benchmark :git clone https://github.com/tensorflow/benchmarks.git
python3 benchmarks/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py --num_gpus=1 --model resnet50 --batch_size 3
Step Img/sec total_loss
1 images/sec: 149.1 +/- 0.0 (jitter = 0.0) 8.748
10 images/sec: 134.2 +/- 5.8 (jitter = 2.6) 7.129
20 images/sec: 135.1 +/- 3.9 (jitter = 2.4) 8.255
30 images/sec: 135.4 +/- 3.3 (jitter = 1.4) 8.506
40 images/sec: 136.5 +/- 2.7 (jitter = 1.7) 7.930
50 images/sec: 137.3 +/- 2.3 (jitter = 1.5) 8.101
60 images/sec: 135.2 +/- 2.2 (jitter = 1.7) 7.891
70 images/sec: 135.3 +/- 2.1 (jitter = 1.6) 8.631
80 images/sec: 135.7 +/- 1.9 (jitter = 1.8) 7.600
90 images/sec: 136.2 +/- 1.7 (jitter = 1.7) 8.106
100 images/sec: 135.8 +/- 1.7 (jitter = 2.1) 8.213
----------------------------------------------------------------
total images/sec: 135.44
----------------------------------------------------------------