summaryrefslogtreecommitdiff
path: root/README
blob: 1b0970d79e8f177fd04e46be61b2fe11b066ac08 (plain)
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
GPGPU-Sim Simulator Version 3.0 (beta)

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, 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 Linux SuSe (this release was tested with SuSe
version 11.1) and has been used on several other Linux platforms.  

Step 1: Ensure you have gcc, g++, make, makedepend, zlib, bison and flex 
installed on your system.  For CUDA 2.x we used gcc version 4.3.2, for CUDA 1.1 
we used gcc/g++ version 4.1.3.  This version of GPGPU-Sim does not work with 
CUDA 4.x; We used bison version 2.3, and flex version 2.5.33.  

Step 2: Download and install the CUDA Toolkit and CUDA SDK code samples from
NVIDIA's website: <http://www.nvidia.com/cuda>.  If you want to run OpenCL on
the simulator, download and install NVIDIA's OpenCL driver from
<http://developer.nvidia.com/object/opencl-download.html>. Update your PATH and
LD_LIBRARY_PATH as indicated by the NVIDIA install scripts.

Step 3: Build the NVIDIA SDK libcutil.a. The install script for the CUDA SDK
does not do this step automatically. If you installed the CUDA Toolkit in a
nonstandard location you will first need to set CUDA_INSTALL_PATH to the
location you installed the CUDA toolkit (including the trailing "/cuda").
Then, change to the C/common subdirectory of your CUDA SDK installation (or
common subdirectory on older CUDA SDK versions) and type "make".

Step 4: Set environment variables by sourcing the setup_environment script. 
From a bash shell, type the following in this directory:

	. setup_environment

Step 5: Type "make" in this directory. This will build the simulator with
optimizations enabled so the simulator runs faster. If you want to run the
simulator in gdb to debug it, then uncomment the line 

	#export GPGPUSIM_CONFIG=debug

in setup_environment and type ". setup_environment" again, then "make" again.

Step 6: Run a CUDA built with a recent version of CUDA (or an OpenCL
application) and the device code should now run on the simulator instead of
your graphics card.  To be able to run the application on your graphics card
again, remove $GPGPUSIM_ROOT/lib from your LD_LIBRARY_PATH.  

Note that for OpenCL applications the NVIDIA driver is required to convert
OpenCL ".cl" files to PTX (this in turn may require you have a graphics card,
but to run CUDA applications on the simulator a graphics card is not
necessary).  The resulting PTX can be saved to disk by adding
-save_embedded_ptx to your gpgpusim.config file (embedded PTX files with be
saved as _0.ptx, _1.ptx, etc...).

3. USING/MODIFYING THE SIMULATOR

Note that doc/GPGPU-Sim_Manual.html has not yet been updated to reflect
changes to GPGPU-Sim versus the earlier 2.x versions.