====== Differences ====== This shows you the differences between two versions of the page.
start [2013/02/11 11:56] jthestness Need to change directories to push GPGPU-Sim patches |
start [2015/03/23 10:35] (current) powerjg [Running gem5-gpu] |
||
---|---|---|---|
Line 7: | Line 7: | ||
==== Required Software ==== | ==== Required Software ==== | ||
Since we build off of gem5, all of the dependencies of gem5 are also dependencies of gem5-gpu. It is suggested that before you try to compile gem5-gpu you compile a copy of gem5 to ensure these baseline dependencies are met. gem5 dependencies can be found [[http://gem5.org/Dependencies|here]], and more gem5 information can be found [[http://gem5.org/|here]]. | Since we build off of gem5, all of the dependencies of gem5 are also dependencies of gem5-gpu. It is suggested that before you try to compile gem5-gpu you compile a copy of gem5 to ensure these baseline dependencies are met. gem5 dependencies can be found [[http://gem5.org/Dependencies|here]], and more gem5 information can be found [[http://gem5.org/|here]]. | ||
+ | |||
+ | One dependency in addition to the gem5 dependencies is a CUDA installation to have access to nvcc and header files. When you have CUDA installed, export the following environment variable used during gem5-gpu build: | ||
+ | <code> | ||
+ | export CUDAHOME=/path/to/your/cuda/install/cuda | ||
+ | </code> | ||
The versions of software we have used to test gem5-gpu are listed [[http://goo.gl/S1ts6|here]]. Deviations from the tested versions may cause errors. | The versions of software we have used to test gem5-gpu are listed [[http://goo.gl/S1ts6|here]]. Deviations from the tested versions may cause errors. | ||
Line 18: | Line 23: | ||
<code> | <code> | ||
- | hg qclone http://repo.gem5.org/gem5 -p http://gem5-gpu.cs.wisc.edu/repo/gem5-patches | + | hg qclone http://repo.gem5.org/gem5 -p http://gem5-gpu.cs.wisc.edu/repo/gem5-patches |
- | cd gem5/ | + | cd gem5/ |
- | hg update -r <gem5-revision> | + | hg update -r <gem5-revision> |
- | hg qpush -a | + | hg qpush -a |
- | cd ../ | + | cd ../ |
</code> | </code> | ||
==== Clone GPGPU-Sim and GPGPU-Sim patches (2 separate options) ==== | ==== Clone GPGPU-Sim and GPGPU-Sim patches (2 separate options) ==== | ||
Line 28: | Line 33: | ||
A) The easy way (recommended): | A) The easy way (recommended): | ||
<code> | <code> | ||
- | hg qclone http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim -p http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim-patches | + | hg qclone http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim -p http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim-patches |
- | cd gpgpu-sim | + | cd gpgpu-sim |
- | hg qpush -a | + | hg qpush -a |
- | cd ../ | + | cd ../ |
</code> | </code> | ||
B) To have full control of GPGPU-Sim (harder): | B) To have full control of GPGPU-Sim (harder): | ||
+ | |||
+ | If you would like to test extensions to the PTX ISA, you may need to modify the Lex+Yacc ISA parser in GPGPU-Sim to enable these extensions. In order to do this, you will need to generate your own ISA parser source code within the GPGPU-Sim code base. Below are instructions for setting up gem5-gpu using the full GPGPU-Sim source to allow for these ISA modifications. | ||
You’ll need the “gpgpu-sim-sha” found [[http://goo.gl/S1ts6|here]]. **NOTE:** If you setup GPGPU-Sim from the public git server instead of pulling from our repositories, you may not be able to submit review requests to our GPGPU-Sim patches repository | You’ll need the “gpgpu-sim-sha” found [[http://goo.gl/S1ts6|here]]. **NOTE:** If you setup GPGPU-Sim from the public git server instead of pulling from our repositories, you may not be able to submit review requests to our GPGPU-Sim patches repository | ||
<code> | <code> | ||
- | git clone git://dev.ece.ubc.ca/gpgpu-sim gpgpu-sim-complete | + | git clone git://dev.ece.ubc.ca/gpgpu-sim gpgpu-sim-complete |
- | cd gpgpu-sim-complete | + | cd gpgpu-sim-complete |
- | git checkout <gpgpu-sim-sha> | + | git checkout <gpgpu-sim-sha> |
- | # This updates GPGPU-Sim the latest version that works with gem5-gpu | + | # This updates GPGPU-Sim the latest version that works with gem5-gpu |
- | cd v3.x | + | cd v3.x |
- | source setup_environment release | + | source setup_environment release |
- | make | + | make |
- | cd ../../ | + | cd ../../ |
- | ln -s gpgpu-sim-complete/v3.x/src gpgpu-sim | + | ln -s gpgpu-sim-complete/v3.x/src gpgpu-sim |
- | cd gpgpu-sim | + | cd gpgpu-sim |
- | hg init | + | hg init |
- | cd .hg/ | + | cd .hg/ |
- | hg clone http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim-patches patches | + | hg clone http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim-patches patches |
- | cd ../ | + | cd ../ |
- | hg add | + | hg add |
- | hg ci -m “Initializing GPGPU-Sim Mercurial base” | + | hg ci -m “Initializing GPGPU-Sim Mercurial base” |
- | hg qpush -a | + | hg qpush -a |
- | cd ../ | + | cd ../ |
</code> | </code> | ||
==== Clone gem5-gpu glue code ==== | ==== Clone gem5-gpu glue code ==== | ||
<code> | <code> | ||
- | hg clone http://gem5-gpu.cs.wisc.edu/repo/gem5-gpu | + | hg clone http://gem5-gpu.cs.wisc.edu/repo/gem5-gpu |
</code> | </code> | ||
==== Build ==== | ==== Build ==== | ||
+ | |||
+ | Below are quick start commands to build and run gem5-gpu with the x86 CPU ISA. For building and running gem5-gpu with the ARM32 CPU ISA, see instructions here: [[arm32_support|ARM32 Support]]. | ||
+ | |||
<code> | <code> | ||
- | cd gem5 | + | cd gem5 |
- | scons build/VI_hammer/gem5.opt --default=X86 EXTRAS=../gem5-gpu/src:../gpgpu-sim/ PROTOCOL=VI_hammer GPGPU_SIM=True | + | scons build/X86_VI_hammer_GPU/gem5.opt --default=X86 EXTRAS=../gem5-gpu/src:../gpgpu-sim/ PROTOCOL=VI_hammer GPGPU_SIM=True |
+ | </code> | ||
+ | |||
+ | You can also build using the pre-defined build options files (found in gem5-gpu/build_opts) as follows: | ||
+ | |||
+ | <code> | ||
+ | cd gem5 | ||
+ | scons build/X86_VI_hammer_GPU/gem5.opt --default=../../../gem5-gpu/build_opts/X86_VI_hammer_GPU EXTRAS=../gem5-gpu/src:../gpgpu-sim/ | ||
</code> | </code> | ||
==== Running gem5-gpu ==== | ==== Running gem5-gpu ==== | ||
- | gem5-gpu is run the same way as gem5. Here is an example of how to run with syscall emulation mode: | + | gem5-gpu is run the same way as gem5. Here is an example of how to run with syscall emulation mode (requires that you build benchmarks per instructions [[benchmarks|here]]): |
<code> | <code> | ||
- | build/VI_hammer/gem5.opt ../gem5-gpu/configs/se_fusion.py -c /path/to/your/benchmarks/rodinia-image/bin/gem5_fusion_backprop -o 16 | + | build/X86_VI_hammer_GPU/gem5.opt ../gem5-gpu/configs/se_fusion.py -c /path/to/your/benchmarks/rodinia/backprop/gem5_fusion_backprop -o 16 |
</code> | </code> | ||
Line 80: | Line 97: | ||
<code> | <code> | ||
- | build/VI_hammer/gem5.opt ../gem5-gpu/configs/se_fusion.py --help | + | build/X86_VI_hammer_GPU/gem5.opt ../gem5-gpu/configs/se_fusion.py --help |
</code> | </code> | ||
Line 88: | Line 105: | ||
<code> | <code> | ||
- | build/VI_hammer/gem5.opt ../gem5-gpu/configs/fs_fusion.py | + | build/X86_VI_hammer_GPU/gem5.opt ../gem5-gpu/configs/fs_fusion.py |
</code> | </code> | ||
- |