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

Introduction to GPU Programming in Python

Introduction to GPU Programming in Python

Yuki Ishikawa

April 21, 2018
Tweet

More Decks by Yuki Ishikawa

Other Decks in Technology

Transcript

  1. CUDA ͱ͸ • Compute Unified Device Architecture • NVIDIA GPU

    Λ࢖ͬͯฒྻܭࢉΛ͢ΔͨΊͷ
 ϓϩάϥϛϯάϞσϧ
  2. CUDA ༻ޠ • ϗετͱσόΠε • CPU ଆΛϗετ, GPU ଆΛσόΠε ͱݺͿ

    • Χʔωϧؔ਺ • GPU ଆͰ࣮ߦ͢ΔॲཧΛهड़ͨؔ͠਺
  3. CUDA ϓϩάϥϛϯάϞσϧ • ฒྻ਺ = εϨου਺ x ϒϩοΫ਺ x άϦου਺

    • 1ϒϩοΫ͋ͨΓ࠷େ 512 εϨου • 1άϦου͋ͨΓ࠷େ 65536^2 ϒϩοΫ 1GPU ͋ͨΓ࠷େ 2 ஹ ฒྻʂʂʂ
 ✌('ω'✌ )ࡾ✌('ω')✌ࡾ( ✌’ω')✌
  4. CUDA ϓϩάϥϛϯάͷํ๏ • C Έ͍ͨͳݴޠͰΧʔωϧؔ਺Λ࣮૷ͯ͠
 nvcc ͱ͍͏ίϯύΠϥͰίϯύΠϧ͢Δ • μϧ͍ •

    GPU Λར༻ͨ͠ฒྻॲཧΛॻ͍ͯΈ͍͕ͨ
 C ͕ॻ͖͍ͨΘ͚Ͱ͸ͳ͍ • Python Ͱॻ͔ͤͯ͘Ε