1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
GPGPU-Sim Simulator Version 3.0.2 build $Change$
This version of GPGPU-Sim works with CUDA version 3.1 and some earlier
versions. It does not (yet) work with CUDA version 4.x.
Please see the copyright notice in the file COPYRIGHT distributed with this
release in the same directory as this file.
If you use this simulator in your research please cite:
Ali Bakhoda, George Yuan, Wilson W. L. Fung, Henry Wong, Tor M. Aamodt,
Analyzing CUDA Workloads Using a Detailed GPU Simulator, in IEEE International
Symposium on Performance Analysis of Systems and Software (ISPASS), Boston, MA,
April 19-21, 2009.
Please sign up for the google groups page for Q&A (see gpgpu-sim.org), but note
that use of this simulator does not imply any level of support. Questions
answered on a best effort basis.
See Section 2 "INSTALLING, BUILDING and RUNNING GPGPU-Sim" below to get started.
1. CONTRIBUTIONS and HISTORY
GPGPU-Sim was created by Tor Aamodt's research group at the University of
British Columbia. Many students have contributed including: Wilson W.L. Fung,
Ali Bakhoda, George Yuan, Ivan Sham, Henry Wong, Henry Tran, Andrew Turner,
Aaron Ariel, Inderpret Singh, Tim Rogers, Jimmy Kwa, and others.
GPGPU-Sim models the features of a modern graphics processor that are relevant
to non-graphics applications. The first version of GPGPU-Sim was used in a
MICRO'07 paper and follow-on ACM TACO paper on dynamic warp formation. That
version of GPGPU-Sim used the SimpleScalar PISA instruction set for functional
simulation, and various configuration files to provide a programming model
close to CUDA. Creating benchmarks for the original GPGPU-Sim simulator was a
very time consuming process. This motivated the development an interface for
directly running CUDA applications to leverage the growing number of
applications being developed to use CUDA. We subsequently added support for
OpenCL and removed all SimpleScalar code.
The interconnection network is simulated using the booksim simulator developed
by Bill Dally's research group at Stanford.
To produce output that is compatible with the output from running the same CUDA
program on the GPU, we have implemented several PTX instructions using the CUDA
Math library (part of the CUDA toolkit). Code to interface with the CUDA Math
library is contained in cuda-math.h, which also includes several structures
derived from vector_types.h (one of the CUDA header files).
See file CHANGES for updates in this and earlier versions.
2. INSTALLING, BUILDING and RUNNING GPGPU-Sim
GPGPU-Sim was developed on SUSE Linux(this release was tested with SUSE
version 11.3) and has been used on several other Linux platforms (both 32-bit
and 64-bit systems). In principle, GPGPU-Sim should work with any linux
distribution as long as the following software dependencies are satisfied.
Step 1: Dependencies
====================
Download and install version 3.1 of the CUDA Toolkit. To use ptxplus (native
hardware instructions) you must currently use the CUDA Toolkit version 2.3.
Otherwise use CUDA 3.1. GPGPU-Sim does not yet support CUDA 4.x. Note that it
is possible to have multiple versions of the CUDA toolkit installed on a single
system -- just install them in different directories and update the
setup_environment script to point to the version you want to use.
[Optional] If you want to run OpenCL on the simulator, download and install
NVIDIA's OpenCL driver from <http://developer.nvidia.com/opencl>. Update your
PATH and LD_LIBRARY_PATH as indicated by the NVIDIA install scripts. Note that
you will need to use the lib64 directory if you are using a 64bit machine. We
have tested OpenCL on GPGPU-Sim using NVIDIA driver version 256.40
<http://developer.download.nvidia.com/compute/cuda/3_1/drivers/devdriver_3.1_linux_64_256.40.run>
Note the most recent version of the NVIDIA driver produces PTX that is
incompatible with this version of GPGPU-Sim.
GPGPU-Sim dependencies:
* gcc
* g++
* make
* makedepend
* xutils
* bison
* flex
* zlib
* libboost
* cuda toolkit
GPGPU-Sim documentation dependencies:
* doxygen
* graphviz
For CUDA 3.1 we used gcc/g++ version 4.3.2 (if using the CUDA 3.1
SDK) or 4.5.1 (if not using the CUDA SDK), for CUDA 2.3 we used gcc/g++ version
4.3.2, for CUDA 1.1 we used gcc/g++ version 4.1.3. This version of GPGPU-Sim
does not yet work with CUDA 4.x; We used bison version 2.3, and flex version
2.5.33.
If you are using Ubuntu, the following commands will install all required
dependencies besides the CUDA Toolkit.
gpgpu-sim dependencies:
"sudo apt-get install build-essential xutils-dev bison zlib1g-dev flex
libboost-all-dev libglu1-mesa-dev"
gpgpu-sim documentation:
"sudo apt-get install doxygen graphviz"
cuda sdk dependencies:
"sudo apt-get install libxi-dev libxmu-dev libglut3-dev"
Step 2: Build
=============
To build the simulator, you first need to configure how you want it to be
built. From the root directory if the simulator, do the following:
cd distribution
then open the file 'setup_environment' with your favorite text editor. Read
the file carefully and modify the environment variables in that file to your
environment specific paths. In particular, you need to set CUDA_INSTALL_PATH
correctly. If you set CUDA_INSTALL_PATH in your .bashrc file as per the
instructions in the cuda toolkit installation, setup_environment will detect
that automatically, in which case, you don't need to change it in
setup_environment. The setup_environment script is engineered to work with a
default system setup, so in the general case you will not need to modify it,
however, you should still read it carefully to figure out of something specific
to your system needs to be changed. After you have edited that file, save it
and run
source setup_environment <build_type>
replace <build_type> with debug or release. Use release if you need faster
simulation and debug if you need to run the simulator in gdb.
Now you are ready to build the simulator, just run
make
After make is done, the simulator would be ready to use. To clean the build,
run
make clean
To build the doxygen generated documentations, run
make docs
to clean the docs run
make cleandocs
The documentation resides at doc/doxygen/html.
Step 3: Run
============
Copy gpgpusim.conf and icnt_config_quadro_islip.txt from
gpgpu-sim/v3.x/configs/QuadroFX5800/ to your application's working directory.
These files configure the microarchitecture model of GPGPU-Sim to resemble a
Quadro FX 5800 (GT 200).
To use ptxplus (native ISA) uncomment the following two lines in
gpgpusim.config (again, note this requires CUDA toolkit 2.3):
#-gpgpu_ptx_convert_to_ptxplus 1
#-gpgpu_ptx_save_converted_ptxplus 1
Now To run a CUDA application on the simulator, simply execute
source setup_environment <built_type>.
and just launch the executable as you would if it was to run on the hardware.
To revert back to running on the hardware, remove GPGPU-Sim from your
LD_LIBRARY_PATH environment variable.
Running OpenCL applications is identical to running CUDA applications. However,
OpenCL applications need to communicate with the NVIDIA driver in order to
build OpenCL at runtime. GPGPU-Sim supports offloading this compilation to a
remote machine. The hostname of this machine can be specified using the
environment variable OPENCL_REMOTE_GPU_HOST. This variable should also be set
through the setup_environment script. If you are offloading to a remote machine,
you might want to setup passwordless ssh login to that machine in order to
avoid having too retype your password for every execution of an OpenCL
application.
If you need to run the set of applications in the NVIDIA CUDA SDK code
samples then you will need to download, install and build the SDK.
3. Documentation
http://gpgpu-sim.ece.ubc.ca/GPGPU-Sim_3.x_Manual
|