source: CLRX/CLRadeonExtender/trunk/README.md @ 3141

Last change on this file since 3141 was 3141, checked in by matszpk, 2 years ago

CLRadeonExtender: Typo in README.md.

File size: 3.7 KB
Line 
1## CLRadeonExtender
2
3This is mirror of the CLRadeonExtender project.
4
5Original site is here [http://clrx.nativeboinc.org](http://clrx.nativeboinc.org).
6
7CLRadeonExtender provides tools to develop software in low-level for the Radeon GPU's
8compatible with GCN 1.0/1.1/1.2/1.4 (AMD VEGA) architecture.
9Currently, this project have two tools
10to develop that software:
11
12* clrxasm - the GCN assembler
13* clrxdisasm - the GCN disassembler
14
15Both tools can operate on four binary formats:
16
17* the AMD Catalyst OpenCL program binaries
18* the GalliumCompute (Mesa) program binaries
19* the AMD Catalyst OpenCL 2.0 program binaries
20* the ROCm (RadeonOpenCompute) program binaries
21
22CLRadeonExtender not only provides basic tools to low-level development, but also
23allow to embed own assembler with AMD Catalyst driver through CLwrapper.
24An embedded assembler can be called from `clBuildProgram` OpenCL call
25with specified option `-xasm`. Refer to README and INSTALL to learn about CLRXWrapper.
26
27### System requirements
28
29CLRadeonExtender requires:
30
31* C++11 compliant compiler (Clang++ or GCC 4.7 or later)
32* GNU make tool
33* CMake system (2.6 or later)
34* Threads support (for Linux, recommended NPTL)
35* Unix-like (Linux or BSD) system or Windows system
36
37Optionally, CLRXWrapper requires:
38
39* libOpenCL.so or OpenCL.dll
40* OpenCL ICD (for example from AMD Catalyst driver)
41* AMD Catalyst driver.
42
43### Compilation
44
45To build system you should create a build directory in source code package:
46
47```
48mkdir build
49```
50
51and run:
52
53```
54cmake .. [cmake options]
55```
56
57Optional CMake configuration options for build:
58
59* CMAKE_BUILD_TYPE - type of build (Release, Debug, GCCSan, GCCSSP).
60* CMAKE_INSTALL_PREFIX - prefix for installation (for example '/usr/local')
61* BUILD_32BIT - build also 32-bit binaries
62* BUILD_TESTS - build all tests
63* BUILD_SAMPLES - build OpenCL samples
64* BUILD_DOCUMENTATION - build project documentation (doxygen, unix manuals, user doc)
65* BUILD_DOXYGEN - build doxygen documentation
66* BUILD_MANUAL - build Unix manual pages
67* BUILD_CLRXDOC - build CLRX user documentation
68* NO_STATIC - no static libraries
69* OPENCL_DIST_DIR - an OpenCL directory distribution installation (optional)
70
71You can just add one or many of these options to cmake command:
72
73```
74cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
75```
76
77After creating Makefiles scripts you can compile project:
78
79`make` or `make -jX` - where X is number of processors.
80
81After building you can check whether project is working (if you will build tests):
82
83```
84ctest
85```
86
87Creating documentation will be done by this command
88(if you will enable a building documentation, required for version 0.1):
89
90```
91make Docs
92```
93
94### Installation
95
96Installation is easy. Just run command:
97
98```
99make install
100```
101
102
103### Usage
104
105Usage of the clrxasm is easy:
106
107```
108clrxasm [-o outputFile] [options] [file ...]
109```
110
111If no file specified clrxasm read source from standard input.
112
113Useful options:
114
115* -g DEVICETYPE - device type ('pitcairn', 'bonaire'...)
116* -A ARCH - architecture ('gcn1.0', 'gcn1.1' or 'gcn1.2')
117* -b BINFMT - binary format ('amd', 'amdcl2', 'gallium', 'rocm', 'rawcode')
118* -t VERSION - driver version for which a binary will be generated
119* -w - suppress warnings
120
121Usage of the clrxdisasm:
122
123```
124clrxdisasm [options] [file ...]
125```
126
127and clrxdisasm will print a disassembled code to standard output.
128
129Useful options for clrxdisasm:
130
131* -a - print everything (not only code, but also kernels and their metadatas)
132* -f - print floating points
133* -h - print hexadecimal instruction codes
134* -C - print configuration dump instead metadatas, CALnotes and setup data
135* -g DEVICETYPE - device type ('pitcairn', 'bonaire'...)
136* -A ARCH - architecture ('gcn1.0', 'gcn1.1' or 'gcn1.2')
137* -t VERSION - driver version for which a binary will be generated
138
139A CLRX assembler accepts source from disassembler.
Note: See TracBrowser for help on using the repository browser.