-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
47 lines (31 loc) · 2.01 KB
/
README
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
GKLEE is a symbolic analyser and test generator tailored for CUDA C++ programs,
it supports almost all of CUDA intrinsic functions in kernel code and majority
of CUDA runtimes in host code. For more details, please visit GKLEE's homepage:
www.cs.utah.edu/fv/GKLEE
======================= Build GKLEE ToolChain ===========================
1. Before you install the GKLEE toolchain, please ensure "flex" and "bison"
are both installed in your Linux system.
2. In the 'Gklee' dir, and run the script 'BuildGklee'.
You will be asked to build Clang/LLVM and GKLEE with the
"Release" or "Debug" mode. This script is able to download
and build all necessary parts automatically.
======================= Set Environment Variables =========================
1. After you finish the instalation, please customize the environment variables
in the following two ways:
-- Add the following lines to your /home/[username]/.bashrc file
-- Create an environment file including the following lines
export KLEE_HOME_DIR=/Path/To/Gklee
export PATH=$KLEE_HOME_DIR/bin:$KLEE_HOME_DIR/Gklee/Release+Asserts/bin:$KLEE_HOME_DIR/llvm/Release+Asserts/bin:$PATH
NOTE: The above environment variables are present under the "Release" building mode, you should adjust "Release" to "Debug" accordingly
if you build GKLEE under the "Debug" mode.
======================= Run GKLEE =========================
After building GKLEE and setting environment variables properly, you could run GKLEE.
1. Compile your CUDA programs into LLVM bytecode with the command:
gklee-nvcc xxx.cu [-o executable] [other options used in nvcc ...]
NOTE: if you do not specify a executable name, gklee-nvcc will use the prefix of the CUDA program
as the default name
2. Run your program with GKLEE command
gklee executable [Normal Mode]
gklee --symbolic-config executable [Parametric Flow Mode]
3. The test cases will be generated in the same dir where you execute gklee,
and appear as 'klee-out-[number]' and 'klee-last'.