diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-06-25 18:04:53 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-06-25 18:55:08 +0800 |
commit | 97c3a9b076ccd24af09fb6ce3f2be7b8e3f93a4f (patch) | |
tree | 1650dbb208d4ceae5a8ff7dd37a91c1a6e13941e /docs/Beignet/Backend.mdwn | |
parent | 7508682d00101231230b6dbbb20b51c5d67deb17 (diff) |
Docs: Rearrange documents according to wiki page on fd.o.
We use fd.o wiki to host our documents. To make the maintainence easier,
I change the direcotry and some links in the markdown files. And make
them the same as fd.o's.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'docs/Beignet/Backend.mdwn')
-rw-r--r-- | docs/Beignet/Backend.mdwn | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/Beignet/Backend.mdwn b/docs/Beignet/Backend.mdwn new file mode 100644 index 00000000..99d678e7 --- /dev/null +++ b/docs/Beignet/Backend.mdwn @@ -0,0 +1,58 @@ +Beignet Compiler +================ + +This code base contains the compiler part of the Beignet OpenCL stack. The +compiler is responsible to take a OpenCL language string and to compile it into +a binary that can be executed on Intel integrated GPUs. + +Limitations +----------- + +Today, the compiler is far from complete. See [[here|Backend/TODO]] for a +(incomplete) lists of things to do. + +Interface with the run-time +--------------------------- + +Even if the compiler makes a very liberal use of C++ (templates, variadic +templates, macros), we really tried hard to make a very simple interface with +the run-time. The interface is therefore a pure C99 interface and it is defined +in `src/backend/program.h`. + +The goal is to hide the complexity of the inner data structures and to enable +simple run-time implementation using straightforward C99. + +Note that the data structures are fully opaque: this allows us to use both the +C++ simulator or the real Gen program in a relatively non-intrusive way. + +Various environment variables +----------------------------- + +Environment variables are used all over the code. Most important ones are: + +- `OCL_SIMD_WIDTH` `(8 or 16)`. Change the number of lanes per hardware thread + +- `OCL_OUTPUT_GEN_IR` `(0 or 1)`. Output Gen IR (scalar intermediate + representation) code + +- `OCL_OUTPUT_LLVM` `(0 or 1)`. Output LLVM code after the lowering passes + +- `OCL_OUTPUT_LLVM_BEFORE_EXTRA_PASS` `(0 or 1)`. Output LLVM code before the + lowering passes + +- `OCL_OUTPUT_ASM` `(0 or 1)`. Output Gen ISA + +- `OCL_OUTPUT_REG_ALLOC` `(0 or 1)`. Output Gen register allocations + +Implementation details +---------------------- + +Several key decisions may use the hardware in an usual way. See the following +documents for the technical details about the compiler implementation: + +- [[Flat address space|flat_address_space]] +- [[Unstructured branches|unstructured_branches]] +- [[Scalar intermediate representation|gen_ir]] +- [[Clean backend implementation|compiler_backend]] + +Ben Segovia. |