Upgrade to Pro — share decks privately, control downloads, hide ads and more …

tesorflow-v1.0-on-ec2

ryo nakamaru
February 20, 2017

 tesorflow-v1.0-on-ec2

MaruLabo × JAWS-UG AI 支部 #2 用の資料です

ryo nakamaru

February 20, 2017
Tweet

More Decks by ryo nakamaru

Other Decks in Programming

Transcript

  1. Topics 1. AWS GPU Πϯελϯε & NVIDIA ੡඼͓͞Β͍ 2. g2

    ܥͰ TensorFlow v1.0 Λ࢖͏ 3 ͭͷํ๏ 3. ҆͘࢖͏ʹ͸
  2. GPU Πϯελϯε AWS ʹ͸ 2 छྨ͋Γ·͢ʢݱߦੈ୅ʣ g2 ܥ: NVIDIA GRID

    K520 ɹɹɹɹ1,536 CUDA cores / GPU ͕ 2 ͭͰ 1 ͭͷ K520 ɹɹɹɹg2 Ͱ࢖͑Δ GPU ͸ຊདྷάϥϑΟοΫɾήʔϛϯά༻్ p2 ܥ: NVIDIA Tesla K80 ɹɹɹɹഒਫ਼౓ԋࢉ࠷େ 2.91 TFLOPSɺ୯ਫ਼౓ԋࢉ࠷େ 8.74 TFLOPS ɹɹɹɹ2,496 CUDA cores / GPU ͕ 2 ͭͰ 1 ͭͷ K80 ɹɹɹɹp2 ͷ GPU ͸൚༻ίϯϐϡʔςΟϯά༻్
  3. υϥΠόʁ ɾGPU ͝ͱʹ NVIDIA Driver ͕഑෍͞Ε͍ͯ·͢ ɹg2 ͳΒ GRID K520ɺp2

    ͳΒ Tesla K80 ͷυϥΠό ɾυϥΠόͷόʔδϣϯ൪߸͸௨͠ɻ ɹྫ: ࠷৽όʔδϣϯͩͱ g2 ܥ GPU ͸ೝࣝͰ͖ͳ͍
  4. ஫ҙ఺ ɾυϥΠό͸ GPU ͝ͱɺCUDA ͸ OS ͝ͱͷ༻ҙ ɾRunfile ΠϯετʔϧͰ͸ GPU

    ͱͷ੔߹ੑʹ஫ҙ ɾg2 ܥͱ p2 ܥ݉༻ͷ AMI Λ࡞ΔͳΒ ɹGRID K520 ͱ Tesla K80 ͲͪΒͰ΋࢖͑ͯ ɹ͔ͭͳΔ΂͘৽͍͠υϥΠόΛ࢖͏
  5. ָ͍ͨ͠ํ΁ ɾAWS ʹ͸ AMI ͱ͍͏ϚγϯΠϝʔδ͕͋Γ·ͯ͠ ɹNVIDIA υϥΠό΋ CUDA ΋͢Ͱʹೖͬͨ΋ͷ͕ʂ ɾNVIDIA

    ެࣜ AMI → AWS Marketplace ΁ Go ɾAWS ެࣜ → “Deep Learning AMI” Ͱ୳ͤ·͢
  6. AMI ར༻ͷώϯτ ɾଞΫϥ΢υͰ͸ CUDA ೖΓެࣜΠϝʔδ͸·ͩͳ͍ ɾNVIDIA / AWS ͍ͣΕͷ AMI

    ΋ݱঢ় CUDA ͸ 7.5 ɾࣗ࡞ͨ͠ AMI Λ Public ʹ͢Δͷ͸ɾɾ ɹɹ- NVIDIA ͷϥΠηϯε ɹɹ- υϥΠόͷΈ NVIDIA AMI + Docker ͱ͍͏ख΋
  7. TensorFlow v1.0 ͷґଘ GPU ൛ TensorFlow ͸ CUDA ͱ cuDNN

    ʹґଘɻ v0.12 Ҏ߱ CUDA 8.0 ΛλʔήοτʹϏϧυ͞Ε͍ͯ ΔͨΊɺ8.0 ܥϥΠϒϥϦʢToolkit શମ͕ 8.0 Ͱ͋Δඞ ཁ͸ͳ͍ʣͱ 367.48 Ҏ߱ ͷ NVIDIA υϥΠό͕ඞཁɻ
  8. ણࡉͳυϥΠόόʔδϣϯ g2 ܥ GRID K520 ͷ࠷৽ରԠυϥΠό͸ 367.57ɻ TensorFlow ͷϏϧυࡁΈόΠφϦ͕ཁٻ͢Δ CUDA

    8.0 + NVIDIA Driver (>= 367.48) Λຬͨ͢ͷ͸ ஍ຯʹ೉͍͠ɻubuntu 16.04 + ҎԼ Runfile Ͱ OK https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/ cuda_8.0.44_linux-run
  9. ࣗ෼ͰϏϧυ͢ΔͳΒ Compute capability: g2 ͷ K520 ͸ 3.0ɺp2 ͷ K80

    ͸ 3.7 TensorFlow ͷϏϧυ࣌ʹࢦఆ͠·͢ɻ https://en.wikipedia.org/wiki/CUDA#GPUs_supported
  10. Docker Λ࢖͏ͳΒ K520 ରԠͷ NVIDIA υϥΠό 367.57 ΛೖΕɺ nvidia-docker ΛηοτΞοϓ͢Ε͹

    OKʂ ΋͘͠͸ AWS ެࣜͷ DeepLearning AMI ubuntu ൛Λ࢖͑͹υϥΠόΠϯετʔϧ͑͞ෆཁɻ