NVIDIA GPU ๋๋ผ์ด๋ฒ๋ GPU ์จ๋๊ฐ ์ผ์ ์์ค ์ด์์ผ๋ก ์ฌ๋ผ๊ฐ๋ฉด ์๋์ผ๋ก GPU์ ๋์ ํด๋ญ์ ๋ฎ์ถฅ๋๋ค. ์ด๋ ํ๋์จ์ด๋ฅผ ๋ณดํธํ๊ธฐ ์ํ ์กฐ์น์ด์ง๋ง ๋์ GPU ๊ณ์ฐ ์ฑ๋ฅ์ด ๊ทธ๋งํผ ๋จ์ด์ง๊ฒ ๋ฉ๋๋ค. ํนํ ์ผ๋ฐ ๊ณต๋์ ์๋ฒ์ GeForce ํน์ TITAN GPU๋ฅผ 4๊ฐ ์ด์ ์ฅ์ฐฉํ์์ ๊ฒฝ์ฐ ์ฑ๋ฅ ์ ํ๊ฐ ๋ ์ฌํ๊ฒ ์ผ์ด๋ฉ๋๋ค.
gpu-stress-test ํ๋ก๊ทธ๋จ์ ์ฌ์ฉํด ํ์ฌ ๊ฐ์ง๊ณ ๊ณ์ GPU ์์คํ
์์ ๋ฐ์ด๋ก ์ธํ ์ฑ๋ฅ ์ ํ๊ฐ ์ผ์ด๋๋์ง๋ฅผ ์ง์ ํ์ธํด ๋ณด์ค ์ ์์ต๋๋ค.
์๋ฅผ ๋ค์ด ์๋ ์คํฌ๋ฆฐ์ท์ TITAN RTX GPU๊ฐ 4๊ฐ ์ฅ์ฐฉ๋ ์์คํ
์์ gpu-stress-test ํ๋ก๊ทธ๋จ์ ์คํํ ๊ฒฐ๊ณผ์
๋๋ค.
์ฒ์์๋ GPU ์ฑ๋ฅ์ด 15 TFLOPS ์ ๋ ๋์์ง๋ง, ๋์ค์๋ GPU ์จ๋๊ฐ 87๋๋ก ์ฌ๋ผ๊ฐ๋ฉด์ ์ฑ๋ฅ์ด 13 TFLOPS๋ก ๋จ์ด์ง๋ ๊ฒ์ ํ์ธํ์ค ์ ์์ต๋๋ค.
๋ง์ฝ ๊ฐ์ง๊ณ ๊ณ์ ์์คํ ์์ ๋ฐ์ด๋ก ์ธํ ์ฑ๋ฅ ์ ํ๊ฐ ๊ด์ธก๋์๋ค๋ฉด, ์ฐจํ์๋ ์๋์ GPU ์์คํ ์ธ DEEP Gadget์ ๋์ ํ๋ ๊ฒ์ ๊ณ ๋ คํด ๋ณด์ญ์์ค.
์ปดํ์ผํ๊ธฐ ์ ์ CUDA ํ๊ฒฝ ์ค์ ์ด ์ ๋์ด ์๋์ง ํ์ธํ์ญ์์ค.
$PATH ํ๊ฒฝ ๋ณ์์ /usr/local/cuda/bin (ํน์ /usr/local/cuda-0.0/bin) ๋๋ ํฐ๋ฆฌ๊ฐ, $LD_LIBRARY_PATH ํ๊ฒฝ ๋ณ์์ /usr/local/cuda/lib64 (ํน์ /usr/local/cuda-0.0/lib64) ๋๋ ํฐ๋ฆฌ๊ฐ ์ถ๊ฐ๋์ด ์์ด์ผ ํฉ๋๋ค.
[user@host ~]$ git clone https://github.com/manycoresoft/gpu-stress-test.git
[user@host ~]$ cd gpu-stress-test
[user@host gpu-stress-test]$ make
nvcc -o test test.cu -lcublas -lnvidia-ml
ํ์ฌ ์์คํ
์ ์ฅ์ฐฉ๋ GPU ๊ฐ์๋งํผ ํฐ๋ฏธ๋์(์๋ฅผ ๋ค์ด PuTTY ์ฐฝ์) ๋์ฐ์ญ์์ค.
๊ทธ ๋ค์ ๊ฐ ํฐ๋ฏธ๋์์ test ํ๋ก๊ทธ๋จ์ ์คํ์ํค๋, ์ธ์๋ก GPU ๋ฒํธ๋ฅผ 0๋ถํฐ ์์ํด ๊ฒน์น์ง ์๊ฒ ๋ฃ์ผ์ญ์์ค.
์๋ ์์๋ ์์คํ
์ GPU๊ฐ 4๊ฐ ์ฅ์ฐฉ๋์ด ์๋ ๊ฒฝ์ฐ์ ์คํ ๋ฐฉ๋ฒ์
๋๋ค.
์ฒซ ๋ฒ์งธ ํฐ๋ฏธ๋์์:
[user@host gpu-stress-test]$ ./test 0
Preparing the stress test...
Ready to use GPU #0.
Run 1: ...
๋ ๋ฒ์งธ ํฐ๋ฏธ๋์์:
[user@host gpu-stress-test]$ ./test 1
Preparing the stress test...
Ready to use GPU #1.
Run 1: ...
์ธ ๋ฒ์งธ ํฐ๋ฏธ๋์์:
[user@host gpu-stress-test]$ ./test 2
Preparing the stress test...
Ready to use GPU #2.
Run 1: ...
๋ค ๋ฒ์งธ ํฐ๋ฏธ๋์์:
[user@host gpu-stress-test]$ ./test 3
Preparing the stress test...
Ready to use GPU #3.
Run 1: ...
test ํ๋ก๊ทธ๋จ์ ํ๋ ฌ ๊ณฑ์
์ฐ์ฐ์ 1,000๋ฒ ์คํํ๋ฉด์ ๊ณ์ํด์ ๊ณ์ฐ ์ฑ๋ฅ๊ณผ GPU ์จ๋๋ฅผ ์ธก์ ํ ๊ฒ์
๋๋ค.
์ฅ์๊ฐ ๊ธฐ๋ค๋ฆฌ๋ฉด์ ์ฑ๋ฅ๊ณผ ์จ๋ ๋ณํ๋ฅผ ํ์ธํด ๋ณด์ญ์์ค.
๋ง์ฝ GPU ์จ๋๊ฐ 80๋๊ฐ ๋์ด๊ฐ๋ฉด์ ๊ณ์ฐ ์ฑ๋ฅ์ด ์ฒ์์ ๋นํด 10% ์ด์ ๋จ์ด์ง๋ค๋ฉด, ๋ฐ์ด๋ก ์ธํ ์ฑ๋ฅ ์ ํ ๋ฌธ์ ๊ฐ ์๋ ๊ฒ์
๋๋ค.

