Gom3rye

What is GPGPU-Sim? 본문

Parallel programming

What is GPGPU-Sim?

Gom3rye 2022. 3. 23. 17:52

What is GPGPU-Sim?

GPGPU-Sim이란 GPU가 없어도 CUDA 또는 OpenCL로 작성된 GPU 프로그램을 돌려볼 수 있는 tool이다.

사용 방법

  1. Docker 컨테이너 구축 " docker run unbuntu /bin/bash"\
  2. GPGPU-Sim build (방법은 https://eunseongg.tistory.com/m/6 참고)
  3. 앱 돌려보기 (https://m.blog.naver.com/steve6238/221747084723 참고) 

나는 cuda-samples 폴더를 클론해서 vectorAdd를 돌려보았다.

돌려본 순서는

 

  1. Makefile을 들어가서 thread 0 지우고

  --cudart shared 써주기

 

원래의 Makefile

  2. cp /gpgpu-sim_distribution/configs/tested-cfgs/SM2_GTX480/gpgpusim.config . 명령어를 통해 실행하려는 앱에 config폴더를 복사해준다. 여기서 " . "의 의미는 내가 지금 있는 곳이라는 뜻이다.

 

  3. make 명령어로 실행파일 만들고

 

  4. 만들어진 실행파일 실행하기 ( ./vetorAdd )

  5. 만약 실행이 되면

이런 화면이 뜰 것이고 실행이 되지 않는다면 2~3줄의 에러 메시지가 뜰 것이다.

728x90
반응형