Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS5100 Advanced Computer Architecture

Similar presentations


Presentation on theme: "CS5100 Advanced Computer Architecture"— Presentation transcript:

1 CS5100 Advanced Computer Architecture
Gem5-GPU Installation CS5100 Advanced Computer Architecture

2 Introduction of Gem5-GPU
It merges 2 popular simulators: gem5 and gpgpu-sim Simulates CPUs, GPUs, and the interactions between them Models a flexible memory system with support for heterogeneous processors and coherence Supports full-system simulation through GPU driver emulation

3 Set up gem5-gpu environment
Platform: Ubuntu 14.04LTS 64bit Recommended RAM size: 4G Recommended Hard Disk size: 80G Download path: gcc 4.7 & g installation sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.7 sudo apt-get install g++-4.7 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g sudo update-alternatives --config gcc sudo update-alternatives --config g++

4 Set up gem5-gpu environment
Install essential packages sudo apt-get install zlib1g-dev bison mercurial scons libprotobuf-dev python-dev swig protobuf-compiler Install CUDA toolkit 3.2 wget chmod +x ./cudatoolkit_3.2.16_linux_64_ubuntu10.04.run sudo ./cudatoolkit_3.2.16_linux_64_ubuntu10.04.run export CUDAHOME=/usr/local/cuda export PATH=$PATH:/usr/local/cuda/bin export LD_LIBRARY_PATH=/usr/local/cuda/lib64

5 Set up gem5-gpu environment
edit .hgrc vim .hgrc type the following in the document [extensions] mq= [ui] username = <your username> ←fill in your own username

6 Set up gem5-gpu environment
Clone gem5 and gem5-patches mkdir gem5-gpu cd gem5-gpu hg qclone -p cd gem5/ hg update -r 11060 hg qpush -a cd ..

7 Set up gem5-gpu environment
Clone GPGPU-Sim and GPGPU-Sim patches hg qclone -p cd gpgpu-sim hg qpush -a cd .. Clone gem5-gpu glue code hg clone Build cd gem5 scons build/X86_VI_hammer_GPU/gem5.opt --default=X86 EXTRAS=../gem5-gpu/src:../gpgpu-sim/ PROTOCOL=VI_hammer GPGPU_SIM=True

8 Set up gem5-gpu environment
Obtain CUDA SDK wget chmod +x ./gpucomputingsdk_3.2.16_linux.run sudo ./gpucomputingsdk_3.2.16_linux.run export NVIDIA_CUDA_SDK_LOCATION=/home/<username>/NVIDIA_GPU_Computing_SDK/C Obtain Benchmarks ~/gem5-gpu $ hg clone Do this under your root directory (gem5-gpu/ in this example)

9 Set up gem5-gpu environment
Compile ~/gem5-gpu$ cd benchmarcks/libcuda/ make If you encounter make error, please export CUDA path in page 4 again cd /home/<username>/NVIDIA_GPU_Computing_SDK/C/common

10 Example of Compiling benchmark
Use gcc 4.4 & g to compile benchmarks sudo apt-get install gcc-4.4 sudo apt-get install g++-4.4 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g sudo update-alternatives --config gcc sudo update-alternatives --config g++ Example of Compiling a Benchmark ~/gem5-gpu/benchmarks$ cd rodinia/backprop make gem5-fusion

11 Example of running benchmark
Example of Running a Benchmark cd gem5/ build/X86_VI_hammer_GPU/gem5.opt ../gem5-gpu/configs/se_fusion.py -c ../benchmarks/rodinia/backprop/gem5_fusion_backprop -o "16“ Or type the commend under if you have problem /home/pads/gem5-gpu/gem5/build/X86_VI_hammer_GPU/gem5.opt /home/pads/gem5-gpu/gem5-gpu/configs/se_fusion.py -c /home/pads/gem5-gpu/benchmarks/rodinia/backprop/gem5_fusion_backprop -o "16” Run other benchmarks 16 is the parameter that backprop benchmark needed, different benchmark will need different type of input Find the command argument at README or run file in the benchmark folder

12 Example of running benchmark with input data
Download input data Compile image compression benchmark dwt ~/gem5-gpu/benchmarks$ cd rodinia/dwt make gem5-fusion Run dwt build/X86_VI_hammer_GPU/gem5.opt ../gem5-gpu/configs/se_fusion.py -c ../benchmarks/rodinia/dwt/gem5_fusion_dwt -o “--dimension 192x192 <your input data folder>/dwt2d/192.bmp <your input data folder>/data/dwt2d/out” Parameters in command correspond to “--dimension <size> <Input_path]> <Output_path>”

13 Possible error When you run benchmark with input data you may encounter following error Please go to gem5/build/X86_VI_hammer_GPU/mem/packet_queue.cc and modify limit of transmitList.size() in line 117, then rebuild gem5

14 Reference Getting Started Build Benchmarks
Build Benchmarks Simulator version information


Download ppt "CS5100 Advanced Computer Architecture"

Similar presentations


Ads by Google