Skip to content
/ Gklee Public
forked from lipeng28/Gklee

GKLEE is a symbolic analyser and test generator tailored for CUDA C++ programs

Notifications You must be signed in to change notification settings

keram88/Gklee

 
 

Repository files navigation

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'.

About

GKLEE is a symbolic analyser and test generator tailored for CUDA C++ programs

Resources

Stars

Watchers

Forks

Packages

No packages published