Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

AMDGPU ROCm Tensorflow 1.8 install memo (not support Ubuntu 1804)

188 views

Published on

AMDGPU ROCm Tensorflow 1.8 install memo (not support Ubuntu 1804)

2018/09/02
SAKURA Internet, Inc.
Research Center
SR / Naoto MATSUMOTO

Published in: Technology
  • Be the first to comment

  • Be the first to like this

AMDGPU ROCm Tensorflow 1.8 install memo (not support Ubuntu 1804)

  1. 1. AMDGPU ROCm Tensorflow 1.8 install memo (not support Ubuntu 1804) 2018/09/02 SAKURA Internet, Inc. Research Center SR / Naoto MATSUMOTO (C) Copyright 1996-2018 SAKURA Internet Inc
  2. 2. AMDGPU ROCm Tensorflow 1.8 install memo (not support Ubuntu 1804) 2 # uname -sr; tail -2 /etc/lsb-release Linux 4.4.0-131-generic DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS" # lscpi 17:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 67ef (rev cf) # apt update # apt dist-upgrade # apt install -y libnuma-dev wget python3-pip # sync; sync; sync; reboot # wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | apt-key add - # vi /etc/apt/sources.list.d/rocm.list deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main # apt update # apt install -y rocm-dkms # usermod -a -G video $LOGNAME # sync; sync; sync; reboot # apt install -y rocm-libs miopen-hip cxlactivitylogger # sync; sync; sync; reboot # wget http://repo.radeon.com/rocm/misc/tensorflow/tensorflow-1.8.0-cp35-cp35m-manylinux1_x86_64.whl # pip3 install ./tensorflow-1.8.0-cp35-cp35m-manylinux1_x86_64.whl # git clone https://github.com/tensorflow/models.git # python3 classify_image.py # cd ; git clone https://github.com/tensorflow/tensorflow.git # cd tensorflow/ # python3 tensorflow/examples/speech_commands/train.py # watch -n 1 /opt/rocm/bin/rocm-smi ==================== ROCm System Management Interface ==================== ================================================================================ GPU Temp AvgPwr SCLK MCLK Fan Perf SCLK OD MCLK OD 0 35c 21.82W 1210Mhz 300Mhz 0.0% auto 0% 0% ================================================================================ ==================== End of ROCm SMI Log ==================== 2018-09-02 10:40:10.368117: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1451] Found device 0 with properties: name: Device 67ef AMDGPU ISA: gfx803 memoryClockRate (GHz) 1.21 pciBusID 0000:17:00.0 Total memory: 2.00GiB Free memory: 1.75GiB Adding visible gpu devices: 0 Device interconnect Created TensorFlow device (/job:localhost/replica:0/task:0/device: GPU:0 with 1567 MB memory) -> physical GPU (device: 0, name: Device 67ef, pci bus id: 0000:17:00.0)
  3. 3. AMDGPU ROCm Tensorflow 1.8 (classify_image.py) 3 # wget http://repo.radeon.com/rocm/misc/tensorflow/tensorflow-1.8.0-cp35-cp35m-manylinux1_x86_64.whl # pip3 install ./tensorflow-1.8.0-cp35-cp35m-manylinux1_x86_64.whl # git clone https://github.com/tensorflow/models.git # python3 classify_image.py 2018-09-02 10:40:10.368117: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1451] Found device 0 with properties: name: Device 67ef AMDGPU ISA: gfx803 memoryClockRate (GHz) 1.21 pciBusID 0000:17:00.0 Total memory: 2.00GiB Free memory: 1.75GiB 2018-09-02 10:40:10.368135: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1562] Adding visible gpu devices: 0 2018-09-02 10:40:10.368153: I tensorflow/core/common_runtime/gpu/gpu_device.cc:989] Device interconnect StreamExecutor with strength 1 edge matrix: 2018-09-02 10:40:10.368162: I tensorflow/core/common_runtime/gpu/gpu_device.cc:995] 0 2018-09-02 10:40:10.368175: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1008] 0: N 2018-09-02 10:40:10.368207: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1124] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1567 MB memory) -> physical GPU (device: 0, name: Device /opt/rocm/miopen/share/miopen/db/gfx803_14.cd.pdb.txt giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca (score = 0.89107) indri, indris, Indri indri, Indri brevicaudatus (score = 0.00779) lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens (score = 0.00296) custard apple (score = 0.00147) earthstar (score = 0.00117) #
  4. 4. AMDGPU ROCm Tensorflow 1.8 (speech_commands/train.py) 4 # git clone https://github.com/tensorflow/tensorflow.git # cd tensorflow/ # python3 tensorflow/examples/speech_commands/train.py 2018-09-02 10:43:36.924800: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA AMDGPU ISA: gfx803 memoryClockRate (GHz) 1.21 pciBusID 0000:17:00.0 Total memory: 2.00GiB Free memory: 1.75GiB : INFO:tensorflow:Step #1: rate 0.001000, accuracy 9.0%, cross entropy 2.724346 INFO:tensorflow:Step #2: rate 0.001000, accuracy 9.0%, cross entropy 2.521507 : INFO:tensorflow:Saving to "/tmp/speech_commands_train/conv.ckpt-4300" INFO:tensorflow:Step #4301: rate 0.001000, accuracy 65.0%, cross entropy 1.094288 INFO:tensorflow:Step #4302: rate 0.001000, accuracy 69.0%, cross entropy 0.876309 : # /opt/rocm/bin/rocm-smi GPU Temp AvgPwr SCLK MCLK Fan Perf SCLK OD MCLK OD 0 52c 44.230W 1172Mhz 1750Mhz 0.0% auto 0% 0% # top top - 10:58:10 up 25 min, 2 users, load average: 1.51, 1.29, 0.89 Tasks: 222 total, 2 running, 220 sleeping, 0 stopped, 0 zombie %Cpu0 : 6.2 us, 1.7 sy, 0.0 ni, 92.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu1 : 5.6 us, 2.8 sy, 0.0 ni, 91.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu2 : 8.3 us, 3.1 sy, 0.0 ni, 88.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu3 : 6.4 us, 2.7 sy, 0.0 ni, 90.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu4 : 9.8 us, 3.7 sy, 0.0 ni, 86.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu5 : 8.4 us, 3.0 sy, 0.0 ni, 88.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu6 : 5.4 us, 2.3 sy, 0.0 ni, 92.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu7 : 3.4 us, 2.0 sy, 0.0 ni, 94.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu8 : 3.4 us, 1.7 sy, 0.0 ni, 94.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu9 : 3.7 us, 1.7 sy, 0.0 ni, 94.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu10 : 6.0 us, 2.7 sy, 0.0 ni, 91.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu11 : 4.4 us, 2.0 sy, 0.0 ni, 93.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st

×