So my research group has developed a GPU emulator that implements all of the PTX 1.3 specification as well as the CUDA high level api as in 2.1 (we do not implement the driver level api). Unlike the emulator that ships with the CUDA SDK which compiles cuda programs into native code, our emulator takes the PTX representation of a program generated by the nvidia compiler, and emulates it directly, one instruction at a time. So far, we can link our implementation of the CUDA runtime using our emulator against most of the CUDA SDK that ships with 2.1 and run about 20% of the applications to completion.
We are using this software internally for analysis of CUDA applications and GPU architecture research. However, it occurs to me that this might be a useful tool for people developing CUDA applications as well (most notably the emulator can handle huge numbers of threads, can detect GPU memory protection violations, executes more or less the exact same instructions that would be executed on a GPU, and has the same concept of a warp as a GPU).
As of now, we are not planning on publicly releasing this emulator either in open source or binary form simply because we do not want to support it. However, if there is enough interest, it would probably be possible to do a public release of source code under a GPL like license or a proprietary release to a company under a BSD like license (for a fee). The idea would be for us to branch our code base after we feel that it is stable enough and pass off development to either the open source community or a company. It is a fairly lengthy process to package up our code base into something that we would want to release and fairly annoying to secure a license from our legal department so I am posting here to see if anyone is interested in picking up this project.
If you are interested in seeing our code base being posted under an open source license please respond to this post. If you are interested in branching our code base and continuing development under an open source license please email me at email@example.com . If you represent a company that might be interesting in obtaining an unlimited usage license to distribute our code base for a fee please contact me at firstname.lastname@example.org as well.
See the attached cuda source and linux 64 binary for an example of the emulator running in debug mode. Note that the binary was compiled from sequence.cu using the following steps:
nvcc --cuda sequence.cu
g++ sequence.cu.cpp -o Sequence libocelot.a -I /home/normal/cuda/include/