OSDN Git Service

CUDA
[eos/hostdependX86LINUX64.git] / util / X86LINUX64 / cuda-6.5 / nvvm / libnvvm-samples / ptxgen / README.txt
1 Introduction
2 ============
3
4 ptxgen is a simple IR compiler that generates PTX code in stdout with the
5 input NVVM IR files. It generates warnings, errors, and other messages in
6 stderr. When multiple input files are given, it links them into a single
7 module before the compilation, and generates a single PTX module.
8
9 ptxgen always links the libDevice library with the input NVVM IR program. 
10
11 Before compiling the input IR, ptxgen will verify the IR for conformance
12 to the NVVM IR specification.
13
14 Usage
15 =====
16
17 The command-line options, except for the program name and the input file
18 names, are directly passed to nvvmCompileProgram without modification.
19 Each input NVVM IR file can be either in the bitcode representation or
20 in the text representation. Input file names and command-line options can be
21 interleaved.
22
23 For example,
24
25   $ ptxgen a.ll -arch=compute_30 b.bc
26
27 links a.ll and b.bc, and generates PTX code for the compute_30 architecture.
28
29 Because ptxgen will try to find the libDevice library, make sure you define
30 the LIBNVVM_HOME preprocessor macro to the directory where libNVVM 
31 components are located when building ptxgen, which is typically
32 $CUDA_HOME/nvvm. 
33