模拟器使用教程
This project provides a complete GPGPU function simulator, which provides CUDA runtime and Warp-level functional simulation support on the device side. This tutorial provides a detailed introduction to using the simulator.
模拟器安装
The operating system platforms we currently support are:
- Ubuntu 18.04
The required toolchain includes:
- gcc 7.5.0
- g++ 7.5.0
- GNU Make 4.1
- CUDA 10.2 Runtime
Please refer tohttps://github.com/SJTU-ACA-Lab/blue-porcelainto download the source code.
Run User Applications
After installing the simulator and activating the project environment, you can use the simulated runtime to support the loading and running of CUDA applications in the emulator. This series of processes is transparent to the user, and the user can run the simulation as if executing the program on a real card.
source setup_environment
./application
集成测试
We now provide基础测试集,including 30 CUDA Applications.Among them, benchmarks/basic
contains 15 common basic CUDA applications, and benchmarks/polybench
contains 15 polybench applications, mostly linear algebra operations. In the benchmarks
folder, make
can compile the application of the entire test set, or compile and run under each test separately.
- Compile the entire test suite (under the
blue-porcelain
folder):
cd ./benchmarks
make
-The steps to run the vector addition test are as follows (under the blue-porcelain
folder ):
source setup_environment
cd ./benchmarks/basic/VECTORADD
./VECTORADD
We also provide automated integration testing. Since the script uses Python, it is necessary to ensure that Python is installed in the system (versions 3.6 to 3.9 are supported). Under the ci
folder, the test script will automatically execute the compiled application and print the execution result and time. In order to use integration tests, you first need to activate the project's environment, and then run the integration test scripts in the ci
directory.
source setup_environment
cd ./ci
sh run.sh -a
The compilation of the emulator and benchmark test set can be controlled by the parameters of the run.sh
script. The optional parameters of the script are as follows:
-core
: Set the number of sm cores (the default is 1, you need to compile the simulator to reset)
-a
: compile the entire project (including emulator and test suite)
-b
: compile only for simulator
-bb
: compile only the test set
Since the script only returns the results of compiled applications, please ensure that all test applications you want to execute have been compiled before testing.