park jong hyun

park jong hyun

School of Electrical and Electronic Engineering, Yonsei University, South Korea

๐Ÿ“ Korea, Republic of
๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์— Real Time kernel ์˜ฌ๋ฆฌ๊ธฐ
Linux

๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์— Real Time kernel ์˜ฌ๋ฆฌ๊ธฐ

ํ•„์ž๋Š” ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์—์„œ Timing ์ด ์•„์ฃผ ์ค‘์š”ํ•œ application ์„ ๊ฐœ๋ฐœํ•˜๊ณ  ์žˆ์—ˆ๋‹ค. ํ”„๋กœ์„ธ์Šค๊ฐ€ context switching ๋˜์–ด ๋‚˜๊ฐ€๋Š” ๋™์•ˆ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜์ง€ ๋ชปํ•ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ์ƒํ™ฉ์ด์—ˆ๋‹ค. ๊ทธ๋ž˜์„œ, ย real time kernel ์„ ์‚ฌ์šฉํ–ˆ๋‹ค. ๋ชจ๋“  kernel ๊ด€๋ จ๋œ ์ž‘์—…์ด ๋งˆ์ฐฌ๊ฐ€์ง€์ง€๋งŒ, ์ด ์ž‘์—… ๋˜ํ•œ ์ฐธ ๊ท€์ฐฎ๋‹ค. ํ•œ๊ตญ์–ด๋กœ ๋œ ์ž๋ฃŒ๋„ ๋งˆ๋•…ํ•œ ๊ฒƒ์ด ์—†๊ธฐ์— ์ด ํฌ์ŠคํŠธ๋ฅผ ์ž‘์„ฑํ•œ๋‹ค. ๋ฐฐ๊ฒฝ ์ง€์‹Real Time

Wine์€ ์–ด๋–ป๊ฒŒ linux์—์„œ windows app์„ ์‹คํ–‰ํ•˜๋‚˜?
Linux

Wine์€ ์–ด๋–ป๊ฒŒ linux์—์„œ windows app์„ ์‹คํ–‰ํ•˜๋‚˜?

์ง€๋‚œ ํฌ์ŠคํŠธ ์—์„œ windows ์™€ linux์˜ ์ฐจ์ด๋ฅผ ์•Œ์•˜๋‹ค. ๊ทธ๋ ‡๋‹ค๋ฉด, Wine ์€ ๊ทธ ๊ฐ„๊ทน์„ ๋งค๊พธ๊ธฐ ์œ„ํ•ด ์–ด๋–ป๊ฒŒ ๊ตฌํ˜„ ํ•˜์˜€๋Š”์ง€ ์•Œ์•„๋ณด์ž. ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ์žก์ง€์‹ ์–˜๊ธฐํ•˜์ž๋ฉด, WINE์€ Wine Is Not Emulator์˜ ์•ฝ์ž์ด๋‹ค. (๊ทธ๋Ÿฐ๋ฐ ๋‚ด ์ƒ๊ฐ์—๋Š” emulator๊ฐ€ ๋งž๋Š” ๊ฒƒ ๊ฐ™๋‹ค.;;) 1. Wine ์˜ ๊ตฌ์กฐ - Builtin / Native Dlls wine์€ ๋ฌด์—‡์„ ๊ตฌํ˜„ํ–ˆ๋Š”๊ฐ€? ์ฒซ์งธ๋กœ PE binary

ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ๊ด€์ ์—์„œ ๋ณธ windows ์™€ linux์˜ ์ฐจ์ด
Linux

ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ๊ด€์ ์—์„œ ๋ณธ windows ์™€ linux์˜ ์ฐจ์ด

๋ณธ ํฌ์ŠคํŠธ๋Š” ํ”„๋กœ๊ทธ๋žจ์˜ ์‹คํ–‰ ๊ด€์ ์—์„œ ์–ด๋–ป๊ฒŒ windows ์™€ linux๊ฐ€ ๋‹ค๋ฅธ์ง€์— ๋Œ€ํ•ด ์–˜๊ธฐํ•˜๊ณ ์ž ํ•œ๋‹ค. ๊ทธ๋ฆฌ๊ณ , ๋‹ค์Œ ํฌ์ŠคํŠธ์—์„œ ๊ทธ ์ฐจ์ด๋ฅผ ์–ด๋–ป๊ฒŒ ๋งž์ถœ ์ˆ˜ ์žˆ๋Š”์ง€์— ๋Œ€ํ•ด ์„ค๋ช…ํ•˜๊ณ ์ž ํ•œ๋‹ค. Ubuntu์™€ ๊ฐ™์€ Linux ๋ฐฐํฌํŒ์„ ์ฒ˜์Œ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋ฉด, ๋„ˆ๋ฌด๋„ ๋‹น์—ฐํ•˜๊ฒŒ ๋Œ๋˜ ๊ฒƒ๋“ค์ด ์•ˆ๋Œ์•„์„œ ๋‹นํ™ฉํ•˜๊ธฐ ๋งˆ๋ จ์ด๋‹ค. (Ex. ์นดํ†ก, ๊ฒŒ์ž„, ์˜คํ”ผ์Šค ๋“ฑ๋“ฑ.) ํ•„์ž๋„ ๋Œ€ํ•™์ƒ๋•Œ ์ฒ˜์Œ์œผ๋กœ ubuntu ๋ฅผ ์„ค์น˜ํ•ด๋ณด๊ณ 

๊ฐœ๋ฐœ์ž(?) 3๋…„ ์ƒํ™œ ๋Œ์•„๋ณด๊ธฐ
Linux

๊ฐœ๋ฐœ์ž(?) 3๋…„ ์ƒํ™œ ๋Œ์•„๋ณด๊ธฐ

ํ•„์ž๋Š” 2017.2 ~ 2019.3 ๊นŒ์ง€ 3๋…„๋™์•ˆ Tmax ์—์„œ ๊ฐœ๋ฐœ์ž(์‚ฌ๋‚ด์—์„œ๋Š” ์—ฐ๊ตฌ์›์ด๋ผ๊ณ  ์นญํ•œ๋‹ค.) ์ƒํ™œ์„ ํ•˜์˜€๋‹ค. ๋ณธ ํฌ์ŠคํŠธ๋Š” 3๋…„๊ฐ„์˜ ์ƒํ™œ์— ๋Œ€ํ•œ ์†ŒํšŒ์ด๋‹ค. ์ผ๊ธฐ ํ˜•์‹์ด๋‹ˆ ๊ทธ๋ƒฅ ์ฝ๊ณ  ์‹ถ์€ ์‚ฌ๋žŒ๋งŒ ์ฝ์–ด๋ผ. ๊ธฐ์ˆ ์ ์ธ ๋‚ด์šฉ์€ ์ฐจ์ฐจ ํ•˜๋‚˜ํ•˜๋‚˜ ํฌ์ŠคํŠธํ•˜๊ณ ์ž ํ•œ๋‹ค. (์˜ˆ๊ณ  ๋‚ด์šฉ์€ ๋งˆ์ง€๋ง‰์— ์žˆ๋‹ค.) 1. ์ž…์‚ฌ ๊ณผ์ • -- ๋‚ด ์†Œ๊ฐœ ํŽ˜์ด์ง€์—๋„ ์จ์žˆ์ง€๋งŒ ๋‚˜๋Š” 2014๋…„ ๋ถ€ํ„ฐ ์—ฐ๋Œ€

์ฒซ Linux ๊ธฐ์—ฌ
Linux

์ฒซ Linux ๊ธฐ์—ฌ

Linux git ์— ๋‚ด ์ด๋ฆ„์ด ์˜ฌ๋ผ๊ฐ”๋‹ค! ํ•˜ํ•˜ ๋ณดํ†ต ๋งํ•˜๋Š” contribute ์„ ํ•œ ๊ฒƒ์€ ์•„๋‹ˆ๊ณ , ๊ทธ๋ƒฅ bug report ์ด๋‹ค. Linux git ์—๋Š” ๊ทธ๋ž˜๋„ bug ๊ฐ€ ํ•ด๊ฒฐ๋˜๋Š” commit ์ด ์˜ฌ๋ผ๊ฐ€๋ฉด reporter ๋„ ์˜ฌ๋ ค์ฃผ๋”๋ผ. (Linux git ์—์„œ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. ) ์ด๋Ÿฐ ์‚ฌ์†Œํ•œ ๊ฒƒ๋„, ์‚ฌ์‹ค ๋‚ด๊ฐ€ ๋‹ค ํ•œ๊ฑด ์•„๋‹ˆ๊ณ  ์šฐ๋ฆฌ ํŒ€ ๊ณ ์ˆ˜ํ˜•(ํ—Œ์ง„์ดํ˜• ์••๋„์ 

Debian Packaging & Policy
Linux

Debian Packaging & Policy

๋ณธ ํฌ์ŠคํŠธ๋Š” debian packaging๊ณผ policy(์ •์ฑ…) ์ผ๋ถ€ ๋Œ€ํ•œ ๊ธฐ๋ณธ์ ์ธ ์ง€์‹์„ ์†Œ๊ฐœํ•˜๋„๋ก ํ•จ. Introduction Debian project ๋Š” ์‰ฝ๊ฒŒ ๋งํ•ด free OS ์ค‘ ์ผ์ข…์ด๊ณ , ๋Œ€ํ‘œ์ ์ธ ์˜ˆ๋กœ Ubutnu ๊ฐ€ debian ๊ณ„์—ด์˜ linux ๋ฐฐํฌํŒ ์ค‘ ํ•˜๋‚˜์ด๋‹ค. ๊ฐœ์ธ์ ์œผ๋กœ ๋‚ด๊ฐ€ ์ƒ๊ฐํ•˜๋Š” Debian ์˜ ๊ฐ€์žฅ ํฐ ์žฅ์ ์€ package managing ์ด๋‹ค. Ubuntu๋ฅผ ์จ๋ณธ ์‚ฌ๋žŒ์ด๋ผ๋ฉด apt install XXXXX ์ด๋Ÿฐ

C++ ํšจ์œจ ํ–ฅ์ƒ ์‹œํ‚ค๊ธฐ (feat. ์ž„์‹œ ๊ฐ์ฒด)
c++

C++ ํšจ์œจ ํ–ฅ์ƒ ์‹œํ‚ค๊ธฐ (feat. ์ž„์‹œ ๊ฐ์ฒด)

๋ณธ ํฌ์ŠคํŠธ๋Š” More Effective C++ item 19 ~ 22 ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์ž‘์„ฑํ•จ. ์ž„์‹œ ๊ฐ์ฒด์˜ origin์„ ์ดํ•ดํ•˜์ž ์ž„์‹œ ๊ฐ์ฒด (Temporaries) ? template<class T> void swap(T& object1, T& object2) { T temp = object1; object1 = object2; object2 = temp; } ์—ฌ๊ธฐ์— ์žˆ๋Š” ์ด temp ๋งํ•˜๋Š”๊ฑฐ ์•„๋‹˜!! HON MONO ์ž„์‹œ ๊ฐ์ฒด๋Š” ์ฝ”๋“œ์—๋„ ์—†๊ณ ,

Linux

Pseudo Terminal (์œ ์‚ฌ? ํ„ฐ๋ฏธ๋„)

๋ณธ ํฌ์ŠคํŠธ๋Š” APUE chap.19 ์„ ์ฐธ๊ณ ํ•˜์—ฌ ์ž‘์„ฑํ•จ. Pseudo Terminal์€ application ์ด ๋ณด๊ธฐ์—๋Š” ํ„ฐ๋ฏธ๋„๋กœ ๋ณด์ด์ง€๋งŒ, ์‚ฌ์‹ค ์ง„์งœ ํ„ฐ๋ฏธ๋„์ด ์•„๋‹Œ ๊ฒƒ์ด๋‹ค. Pseudo Terminal์˜ ๊ตฌ์กฐ, ์˜ˆ์‹œ, ์‚ฌ์šฉ๋ฒ•์— ๋Œ€ํ•ด ์„ค๋ช…ํ•˜๋„๋ก ํ•จ. Pseudo Terminal ๊ฐœ์š” Pseudo terminal ์„ ์‚ฌ์šฉํ•˜๋Š” ํ”„๋กœ์„ธ์Šค๋“ค์˜ ์ „ํ˜•์ ์ธ ๊ตฌ์กฐ๋Š” ์•„๋ž˜์™€ ๊ฐ™๋‹ค. ๋ถ€๋ชจ ํ”„๋กœ์„ธ์Šค๊ฐ€ pseudo terminal master๋ฅผ open ํ•˜๊ณ  fork ->

Uniscribe vs Pango

Uniscribe vs Pango

๊ธฐ๋ณธ์ ์ธ ๊ณผ์ • Itemize (item ๋ถ„๋ฆฌ) Shape (item ๋ณ„ glyph ์ถ”์ถœ) Place (?) Render 1. Itemize a. Uniscribe HRESULT ScriptItemize( _In_ const WCHAR *pwcInChars, _In_ int cInChars, _In_ int cMaxItems, _In_opt_ const SCRIPT_CONTROL *psControl, _In_opt_ const SCRIPT_STATE *psState, _Out_ SCRIPT_ITEM *pItems, _Out_ int *pcItems ); pItems ์ด ๋–จ์–ด์ง€๋Š”

๋ฐ๋ชฌ ํ”„๋กœ์„ธ์Šค (daemon process)
Linux

๋ฐ๋ชฌ ํ”„๋กœ์„ธ์Šค (daemon process)

๋ณธ ํฌ์ŠคํŠธ๋Š” APUE chap.13 ์„ ์ฐธ๊ณ ํ•˜์—ฌ ์ž‘์„ฑํ•จ. ๋ฐ๋ชฌ์€ ์˜ค๋ž˜์‚ฌ๋Š” ํ”„๋กœ์„ธ์Šค๋ฅผ ๋งํ•˜๊ณ , ๋ณดํ†ต์€ ์‹œ์Šคํ…œ์ด ๋ถ€ํŒ…๋  ๋•Œ ๊ฐ™์ด ์ผœ์ง€๊ณ  ์ข…๋ฃŒ๋  ๋•Œ ๊ฐ™์ด ๋๋‚จ. Controlling ํ„ฐ๋ฏธ๋„์ด ์—†์–ด์„œ background์—์„œ ๋ˆ๋‹ค๋ผ๊ณ  ํ‘œํ˜„ํ•œ๋‹ค. ๋ฐ๋ชฌ์˜ ๊ตฌ์กฐ, ์ž‘์„ฑ๋ฒ•, ์˜ค๋ฅ˜ ๋กœ๊น…์— ๋Œ€ํ•ด ์„ค๋ช…ํ•˜๋ ค๊ณ  ํ•จ! ๋ฐ๋ชฌ์˜ ํŠน์ง• ps -efj ์™€ ๊ฐ™์€ ๋ช…๋ น์–ด๋กœ ํ™•์ธ controlling ํ„ฐ๋ฏธ๋„์ด ์—†๋Š” ํ”„๋กœ์„ธ์Šค (๋ฐ๋ชฌ)์„

Uniscribe
font

Uniscribe

Uniscribe๋Š” ๋ณต์žกํ•œ ์–ธ์–ด๋ฅผ ์ฒ˜๋ฆฌํ•˜๊ณ , ๊ธ€์”จ๋ฅผ ์•„์ฃผ ์ž˜ (high degree of control) ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ๋Š” API ๋ชจ์Œ์ด๋‹ค. Layout Text with Uniscribe ( MSDN page์˜ ๋‚ด์šฉ์„ ๋ฒˆ์—ญ. ) ์•„๋ž˜์˜ ์ˆœ์„œ๋Œ€๋กœ uniscribe call๋“ค์„ ์‚ฌ์šฉํ•˜๋ฉด layout ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ๋ฌธ๋‹จ์€ run๋“ค๋กœ ์ด๋ฏธ ๋‚˜๋ˆ ์ ธ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ณ . ์ฒซ ์‹œ์ž‘์ด๋‚˜ WM_SETTINGCHANGE ๋ฉ”์„ธ์ง€๋ฅผ ๋ฐ›์•˜์„ ๋•Œ, ScriptRecordDigitSubstitution ํ˜ธ์ถœ. (Optional) complex processing ์ด

AMD์˜ CPU: ZEN์˜ ๋งˆ์ผ€ํŒ… ํฌ์ธํŠธ๋ฅผ์•Œ์•„๋ณด์ž
CPU

AMD์˜ CPU: ZEN์˜ ๋งˆ์ผ€ํŒ… ํฌ์ธํŠธ๋ฅผ์•Œ์•„๋ณด์ž

AMD์˜ ์ƒˆ๋กœ์šด CPU, ZEN์˜ ์ถœ์‹œ๊ฐ€ ๋‹ค๊ฐ€์™”๋‹ค. ์ž‘๋…„๋ถ€ํ„ฐ ์ˆ˜ ๋งŽ์€ ๋ฐœํ‘œ(์„ค๋ ˆ๋ฐœ?)์ด ์žˆ์—ˆ๋Š”๋ฐ, AMD๊ฐ€ ๋‚ด์„ธ์šฐ๋Š” ํ•ญ๋ชฉ๋“ค์„ ์‚ดํŽด๋ณด๊ณ ์ž ํ•œ๋‹ค. ๊ณผ์—ฐ ์ด๋ฒˆ์—๋Š” AMD๊ฐ€ ์ œ๋Œ€๋กœ ์ผ์„ ํ–ˆ์„์ง€... AMD SenseMI technology ์ด๋ฒˆ์— ์ƒˆ๋กœ์šด ๊ธฐ์ˆ ๋“ค์˜ ์ด๋ฆ„์ด SenseMI๋žœ๋‹ค. ์ด๋ฆ„์ด์•ผ ๊ทธ๋ ‡๋‹ค๊ณ  ์น˜๊ณ , 5๊ฐ€์ง€๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ๋Š”๋ฐ ํ•œ๋ฒˆ ์•Œ์•„๋ณด์ž. (Pure Power, Precision Boost, Extended Frequency Range, Neural Net Prediction, Smart

๊ตฌ๊ธ€์˜ ์ธ๊ณต์ง€๋Šฅ์„ ์œ„ํ•œ ํ•˜๋“œ์›จ์–ด TPU
Deep Learning

๊ตฌ๊ธ€์˜ ์ธ๊ณต์ง€๋Šฅ์„ ์œ„ํ•œ ํ•˜๋“œ์›จ์–ด TPU

๊ตฌ๊ธ€์ด Tensor Processing Unit (TPU) ๋ฅผ ๊ณต๊ฐœํ–ˆ๋‹ค. (์†”์งํžˆ ์ถฉ๊ฒฉ์ ์ด๋‹ค....) ์ด๋Š” custom ASIC (ํŠน์ˆ˜ ๋ชฉ์ ์„ ์œ„ํ•œ ํ•˜๋“œ์›จ์–ด ์นฉ)์œผ๋กœ, TensorFlow๋ž‘ ๋ฌผ๋ ค ์‚ฌ์šฉํ•˜๋Š” ์ธ๊ณต์ง€๋Šฅ์„ ์œ„ํ•œ ์นฉ์ด๋‹ค. ์ด๋ฒˆ์— ๊ณต๊ฐœ๋œ ๋‚ด์šฉ์— ๋Œ€ํ•ด ์„ค๋ช…์„ ํ•˜๊ณ ์ž ํ•œ๋‹ค. ๋ณธ ํฌ์ŠคํŠธ๋Š” ๊ตฌ๊ธ€์˜ ๊ณต์‹ ๋ธ”๋กœ๊ทธ ๊ธ€์„ ๋ฐ”ํƒ•์œผ๋กœ ์ž‘์„ฑํ•˜์˜€์œผ๋‹ˆ, ๊ถ๊ธˆํ•˜์‹  ๋ถ„์€ ์˜† ๋งํฌ๋ฅผ ์ฐธ์กฐ ํ•˜์‹œ๊ธธ. TPU๋Š” ์–ด๋””์— ์“ฐ๋‚˜์š”? TPU๋Š” ์ด๋ฆ„์—์„œ๋„

Deep Learning ์œ„ํ•ด์„œ๋Š” ์–ด๋–ค GPU๋ฅผ ์‚ฌ์•ผ ํ• ๊นŒ์š”?
GPGPU

Deep Learning ์œ„ํ•ด์„œ๋Š” ์–ด๋–ค GPU๋ฅผ ์‚ฌ์•ผ ํ• ๊นŒ์š”?

๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด deep learning์— ๊ด€์‹ฌ์„ ๊ฐ€์ง€๊ณ , ์ด๋ฅผ ์œ„ํ•ด GPU๋ฅผ ์‚ฌ์„œ ์“ด๋‹ค. GPU computing ๋ฐ architecture๋ฅผ ์ „๊ณตํ•˜๋Š” ์‚ฌ๋žŒ์œผ๋กœ, ๋ฟŒ๋“ฏ(?)ํ•˜๊ธฐ๋„ ํ•˜๋‹ค. ๊ทธ๋ž˜์„œ, deep learning์„ ์œ„ํ•ด GPU๋ฅผ ์‚ฌ๊ณ ์ž ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ๊ธ€์„ ์“ด๋‹ค. ์กฐ๊ธˆ์ด๋ผ๋„ ๋„์›€์ด ๋˜์‹œ๊ธธ... (Blog์— ์žˆ๋Š” ๊ธ€๊ณผ ๋‚ด ๊ฐœ์ธ์ ์ธ ์ง€์‹์„ ๋ฐ”ํƒ•์œผ๋กœ ์ž‘์„ฑํ•จ.) AMD? NVIDIA? NVIDIA ๊ฒƒ์„ ์‚ฌ๋ผ. ์ด๊ฒฌ์˜ ์—ฌ์ง€ ์กฐ์ฐจ์—†๋‹ค.

Pascal - NVIDIA์˜ ์ƒˆ๋กœ์šด GPU architecture ๋ฐœํ‘œ
GPGPU

Pascal - NVIDIA์˜ ์ƒˆ๋กœ์šด GPU architecture ๋ฐœํ‘œ

๋“œ๋””์–ด NVIDIA ์—์„œ ์ƒˆ๋กœ์šด Pascal GPU๋ฅผ ๋ฐœํ‘œํ–ˆ๋‹ค. ์ด๋ฏธ ๋ช‡ ๋‹ฌ์ „์— ์ผ๋ถ€(?) ๊ณต๊ฐœ๊ฐ€ ๋˜์—ˆ๊ณ , ๋ฃจ๋จธ๋“ค๋„ ๋งŽ์•„์„œ ๊ด€์‹ฌ์žˆ๋Š” ์‚ฌ๋žŒ๋“ค์€ ๋ฏธ๋ฆฌ ์ข€ ์•Œ์•˜๊ฒ ์ง€๋งŒ ๊นŒ๋ณด๋‹ˆ ํฅ๋ฏธ๋กœ์šด ๊ฒƒ๋“ค์ด ์ข€ ์žˆ๋‹ค. ๊ฐœ์ธ์ ์œผ๋กœ ๊ฐ€์žฅ ๋†€๋ผ์šด ๊ฒƒ์€ half-precision! (Deep learning ์‹œ์žฅ์„ ์–ด์ง€๊ฐ„ํžˆ๋„ ๋จน๊ณ  ์‹ถ๊ธด ํ•˜๋‚˜๋ณด๋‹ค.) ์ž ๊ทธ๋Ÿผ, ์ฃผ๋ชฉํ• ๋งŒํ•œ ๊ฒƒ๋“ค์„ ์‚ดํŽด๋ณด์ž. Pascal ์ด ๋ญ”๊ฐ€์š”? NVIDIA๋Š” 2000๋…„๋Œ€ ์ค‘๋ฐ˜๋ถ€ํ„ฐ ์ž์‚ฌ์˜ GPU

์ „๋ฌธ๊ฐ€์šฉ ๊ทธ๋ž˜ํ”ฝ์นด๋“œ๋Š” ๋ญ๊ฐ€ ๋‹ค๋ฅธ๊ฐ€์š”?
GPU

์ „๋ฌธ๊ฐ€์šฉ ๊ทธ๋ž˜ํ”ฝ์นด๋“œ๋Š” ๋ญ๊ฐ€ ๋‹ค๋ฅธ๊ฐ€์š”?

์ด๋ฒˆ ํฌ์ŠคํŠธ๋Š” ์ „๋ฌธ๊ฐ€์šฉ ๊ทธ๋ž˜ํ”ฝ์นด๋“œ์— ๋Œ€ํ•œ ์„ค๋ช…์„ ํ•˜๊ณ ์ž ํ•œ๋‹ค. ์•„๋ž˜ ๊ทธ๋ฆผ์€ ๋‹ค๋‚˜์™€์—์„œ "์ „๋ฌธ๊ฐ€์šฉ VGA" ํƒญ์„ ํด๋ฆญํ–ˆ์„ ๋•Œ ๋‚˜์˜ค๋Š” ์ƒํ’ˆ์ธ๋ฐ, ๋ฌด๋ ค 790๋งŒ์›.... ์ด ๋†ˆ๋“ค์€ ๋ญํ•˜๋Š” ๋†ˆ๋“ค์ด๊ธธ๋ž˜ ์ด๋ ‡๊ฒŒ ๋น„์‹ผ์ง€ ์‰ฝ๊ฒŒ ์„ค๋ช…ํ•˜๊ณ ์ž ํ•œ๋‹ค. ์šฐ์„  GPU ๊ณ„์˜ ์–‘๋Œ€ ์‚ฐ๋งฅ ๋ผ์ธ์—…์—์„œ ์ „๋ฌธ๊ฐ€์šฉ ๊ทธ๋ž˜ํ”ฝ์นด๋“œ๋ฅผ ์นญํ•˜๋Š” ๋ธŒ๋žœ๋“œ๋ช…๋ถ€ํ„ฐ ์–˜๊ธฐํ•˜๊ณ ์ž ํ•œ๋‹ค. NVIDIA ์—์„œ๋Š” ์ผ๋ฐ˜ ์†Œ๋น„์ž์šฉ ๊ทธ๋ž˜ํ”ฝ์นด๋“œ๋Š” Geforce ์‹œ๋ฆฌ์ฆˆ(

์•ŒํŒŒ๊ณ (AlphaGo)๊ฐ€ ๋ฐ”๋‘‘ ๋‘๋Š” ๋ฐฉ๋ฒ•
Deep Learning

์•ŒํŒŒ๊ณ (AlphaGo)๊ฐ€ ๋ฐ”๋‘‘ ๋‘๋Š” ๋ฐฉ๋ฒ•

๊ตฌ๊ธ€์˜ ๋”ฅ๋งˆ์ธ๋“œ(DeepMind)์—์„œ ๋งŒ๋“  deep learning ๊ธฐ๋ฐ˜ ๋ฐ”๋‘‘ ํ”„๋กœ๊ทธ๋žจ(?) ์•ŒํŒŒ๊ณ (AlphaGo)๊ฐ€ ์˜ค๋Š” 3์›” 9์ผ ๋ถ€ํ„ฐ 15์ผ๊นŒ์ง€ ์ด์„ธ๋Œ 9๋‹จ๊ณผ ๊ฒฝ๊ธฐ๋ฅผ ๊ฐ€์ง„๋‹ค. ์žฅ์•ˆ์˜ ํ™”์ œ๋ผ ๋‚˜๋„ ๊ถ๊ธˆํ•ด์„œ ํ•œ๋ฒˆ ์ฐพ์•„๋ณด์•˜๊ณ , ์ด๋ฅผ ๊ณต์œ ํ•˜๊ณ ์ž ์ด ๊ธ€์„ ์“ด๋‹ค. ์ด ๊ธ€์˜ ๋‚ด์šฉ์€ Nature์— ์‹ค๋ฆฐ ์•ŒํŒŒ๊ณ  ๋…ผ๋ฌธ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์ž‘์„ฑํ•˜์˜€๊ณ , ๋‚ด ์ˆ˜์ค€์ด ๋”ธ๋ ค์„œ ์ž˜๋ชป ์ดํ•ดํ•˜๊ณ  ์“ด ๋‚ด์šฉ๋„ ์žˆ์„

GPGPU

STT-RAM for GPU register file

์ด๋ฒˆ์—๋Š” ๊ฐ•์ œ๋กœ ๊ณต๋ถ€ํ•˜๊ฒŒ๋œ ๋…ผ๋ฌธ ๋‚ด์šฉ์„ ์†Œ๊ฐœํ•œ๋‹ค. ์ „ํ˜•์ ์ธ well-organized(?) ๋œ ๋…ผ๋ฌธ ์ธ๊ฑฐ ๊ฐ™์•„์„œ ์ ์–ด๋‘๋ ค๊ณ  ํ•œ๋‹ค. ASP-DAC ์— ๋‚˜์˜จ ๋…ผ๋ฌธ์ธ๋ฐ, ์ž์„ธํ•œ ์ •๋ณด๋Š” ์ง์ ‘ ์ฐพ์•„๋ณด๋ฉด ๋œ๋‹ค. ๋…ผ๋ฌธ ๋งํฌ Main contribution MLC STT-RAM ์œผ๋กœ GPU register file์„ ๊ตฌ์„ฑ (๊ธฐ์กด์—๋Š” SRAM) MLC ํŠน์„ฑ์ƒ ๋ฐœ์ƒํ•˜๋Š” soft-bit ๊ณผ hard-bit์— ์†๋„ ์ฐจ์ด๋ฅผ ์ด์šฉํ•˜์—ฌ, ์ž์ฃผ ์“ฐ์ด๋Š” ๋ฐ์ดํ„ฐ๋Š” soft-bit์— mapping

GPGPU

GPU Virtualization

CPU์ฒ˜๋Ÿผ GPU๋„ virtualization (๊ฐ€์ƒํ™”) ๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค!! ๊ฐ„๋‹จํ•˜๊ฒŒ virtualization ์ด ๋ญ”์ง€ ์„ค๋ช…ํ•˜์ž๋ฉด ์‚ฌ์šฉ์ž์—๊ฒŒ ํ•˜๋“œ์›จ์–ด๊ฐ€ ์žˆ๋‹ค๊ณ  ๋ปฅ์น˜๋Š” ๊ฒƒ์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๊ฒ ๋‹ค. ์˜ˆ๋ฅผ ๋“ค๋ฉด, ์ปดํ“จํ„ฐ๊ฐ€ ์ง€๊ธˆ CPU๊ฐ€ 1๊ฐœ ์žˆ๋Š”๋ฐ ์‚ฌ์šฉ์ž A์—๊ฒŒ๋„ CPU 1๊ฐœ ์žˆ๋‹ค๊ณ  ํ•˜๊ณ , ์‚ฌ์šฉ์ž B์—๊ฒŒ๋„ CPU 1๊ฐœ ์žˆ๋‹ค๊ณ  ํ•ด์„œ, ์ด 2๊ฐ€์ง€์˜ ์ผ์„ ๋ฐ›์€ ํ›„ ์‹œ๊ฐ„์„ ์ชผ๊ฐœ์„œ ์‹คํ–‰ํ•ด ์ฃผ๋Š” ๊ฒƒ์ด๋‹ค. 1๊ฐœ์˜ CPU๋ฅผ

CUDA Memory Model
GPGPU

CUDA Memory Model

CUDA ํ”„๋กœ๊ทธ๋žจ์€ ๊ฐ™์€ ์ผ์„ ํ•˜๋”๋ผ๋„ ๊ตฌํ˜„ ๋ฐฉ์‹(์•Œ๊ณ ๋ฆฌ์ฆ˜)์— ๋”ฐ๋ผ ์ฒœ์ฐจ๋งŒ๋ณ„์˜ ์„ฑ๋Šฅ์„ ๋ณด์ธ๋‹ค. ๊ทธ ์ค‘ Memory Model๋ฅผ ๋ชจ๋ฅด๋ฉด ์ •๋ง ํ”„๋กœ๊ทธ๋žจ์ด ํ•œ์ฐธ ๋Š๋ ค์ง„๋‹ค. CUDA Memory Model ์ด๋ฅผ ์œ„ํ•ด ๊ฐ€์žฅ ๋จผ์ € ์•Œ์•„์•ผ ํ•˜๋Š” ๊ฒƒ์ด memory model ์ด๋‹ค. CUDA ์—๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ์žˆ๋‹ค. ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๊ฒƒ์€ global memory ์™€

GPGPU Simulation - 2๋ถ€
GPGPU

GPGPU Simulation - 2๋ถ€

์ง€๋‚œ๋ฒˆ์— ์†Œ๊ฐœํ•œ GPGPU Simulation ์˜ ์‹ค์ œ ์˜ˆ๋ฅผ ๋ณด์—ฌ์ฃผ๊ฒ ๋‹ค. GPGPU-sim gpgpu-sim ํ™ˆํŽ˜์ด์ง€์— ๊ฐ€๋ณด๋ฉด, ๋ฉ”๋‰ด์–ผ์„ ๋ณด๊ณ  ์ฝ”๋“œ๋ฅผ ๋‹ค์šด ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค. ๋ฆฌ๋ˆ…์Šค์—์„œ ์„ค์น˜ ๋ฐ ์‹คํ–‰์ด ๊ฐ€๋Šฅํ•˜๊ณ , CUDA๋Š” ์ตœ์‹  ๋ฒ„์ „์„ ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค.... ๊ฐ„๋‹จํ•˜๊ฒŒ ๋Œ๋ฆฐ ์˜ˆ๋ฅผ ํ•œ๋ฒˆ ๋ณด์—ฌ๋“œ๋ฆผ. ์ปค๋„์ด ๋๋‚œ ํ›„์˜ ๊ฒฐ๊ณผ์ด๋‹ค. ์ปค๋„์ด ์ด ๋ช‡๊ฐœ์˜ instruction ์ธ์ง€ ๋ช‡ cycle์ด๋‚˜ ๊ฑธ๋ ธ๋Š”์ง€๋ฅผ ๋น„๋กฏํ•˜์—ฌ, ์–ด๋Š ๋ถ€๋ถ„์—์„œ stall

GPGPU Simulation - 1๋ถ€
GPGPU

GPGPU Simulation - 1๋ถ€

Simulation Simulation์„ ์ด์šฉํ•˜๋ฉด GPU์—†์ด CPU๋งŒ์œผ๋กœ๋„ CUDA (OpenCL) ์ฝ”๋“œ๋ฅผ ๋Œ๋ ค๋ณผ ์ˆ˜ ์žˆ๋‹ค. (๋ฌผ๋ก  emulation ๋งŒ์œผ๋กœ๋„ ๊ฐ€๋Šฅํ•˜๋‹ค.) CPU ์—์„œ GPU์˜ ๋™์ž‘์„ ์†Œํ”„ํŠธ์›จ์–ด๋กœ ๊ตฌํ˜„ simulator ๋“ค์ด ์žˆ๋‹ค. ๋Œ€ํ‘œ์ ์œผ๋กœ gpgpu-sim ๊ณผ multi2sim ์ด ์žˆ๋‹ค. Verilog๋กœ ๊ตฌํ˜„๋˜์–ด CPU๊ฐ€ ์•„๋‹Œ FPGA์—์„œ GPU๋ฅผ ์ง์ ‘ ๊ตฌ์›Œ๋ณผ์ˆ˜ ์žˆ๋Š” miaowgpu ๋„ ์žˆ๋‹ค. Simulation์˜ ์šฉ๋„ ์ด๋Ÿฌํ•œ simulation์€ ์‚ฌ์‹ค GPU๊ฐ€ ์—†๋Š” ์‚ฌ๋žŒ์„

GPGPU - 2๋ถ€
GPGPU

GPGPU - 2๋ถ€

GPGPU๋ž€?? - 2๋ถ€ GPGPU๋ฅผ ์œ„ํ•œ GPU ๊ตฌ์กฐ ์ง€๋‚œ 1๋ถ€์—์„œ ์–ธ๊ธ‰ํ•œ ๊ฒƒ ๊ณผ ๊ฐ™์ด GPU๋Š” ๊ทธ๋ž˜ํ”ฝ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ ํ•˜๋“œ์›จ์–ด์ด๊ณ  ๊ทธ๋ž˜ํ”ฝ ์ฒ˜๋ฆฌ๋Š” ๋Œ€๋Ÿ‰์˜ data-level-parallelism ์„ ๊ฐ€์ง„๋‹ค. ๋”ฐ๋ผ์„œ, ๊ธฐ๋ณธ์ ์œผ๋กœ SIMD ํ˜•ํƒœ์˜ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง„๋‹ค. (SIMD = Single Instruction Multiple Data) ์œ„ ๊ทธ๋ฆผ ์ฒ˜๋Ÿผ ํ•˜๋‚˜์˜ instruction์„ ์—ฌ๋Ÿฌ๊ฐœ์˜ ALU๊ฐ€ ๋™์‹œ์— ์—ฌ๋Ÿฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌ ํ•˜๋Š” ๊ฒƒ์„ SIMD ๋ผ๊ณ 

GPGPU - 1๋ถ€
GPGPU

GPGPU - 1๋ถ€

GPGPU (General Purpose computation on GPU) ๋ž€?? GPU ๋ถ€ํ„ฐ ์•Œ์•„๋ณด์ž (๊ฐ„๋‹จํ•˜๊ฒŒ) GPU (Graphics Processing Unit) ์€ ๋‹ค๋“ค ์•Œ๊ฒ ์ง€๋งŒ Graphics ์—ฐ์‚ฐ์„ ์œ„ํ•œ ์ „์šฉ ํ•˜๋“œ์›จ์–ด์ด๋‹ค. ๋ณดํ†ต ์™ธ์žฅ ๊ทธ๋ž˜ํ”ฝ์นด๋“œ์— ๋‹ฌ๋ฆฐ ๊ฐ€์šด๋ฐ ํฐ ์นฉ์ด๋‹ค. (๊ทธ๋ž˜ํ”ฝ์นด๋“œ๋Š” GPU๊ฐ€ ์•„๋‹ˆ๋ผ GPU์™€ ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ๊ฐ™์ด ๋‹ฌ๋ฆฐ ๋ณด๋“œ์ž„.) ์š”์ฆˆ์Œ์—๋Š” CPU์—๋„ ๋‚ด์žฅ GPU๊ฐ€ ๊ฐ™์ด ๋‹ฌ๋ ค๋‚˜์˜จ๋‹ค. Intel Core CPU ๊ณ„์—ด์—๋Š” HD graphics