source: CLRX/CLRadeonExtender/trunk/INSTALL @ 3891

Last change on this file since 3891 was 3891, checked in by matszpk, 16 months ago

CLRadeonExtender: Add info about building under FreeBSD. Add extra rpath when FreeBSD and gcc used.

File size: 4.8 KB
Line 
1-----------------------------------------------------------------------
2                               CLRadeonExtender
3-----------------------------------------------------------------------
4
51. Installation prerequisities.
6
7CLRadeonExtender doesn't require many libraries and dependencies.
8It can be installed on the 32-bit/64-bit machines.
9Currently, the OpenCL support for AMD Catalyst (for the OpenCL applications)
10is disabled by default (enablement is not recommended in current development
11stage).
12
13This package provides source code and requires:
14
15* C++11 compliant compiler (Clang++ or GCC 4.7 or later, MSVC 2015 or later)
16* any build system supported by CMake (GNU make, NMake, Visual Studio, ...)
17* CMake system (2.8 or later)
18* Threads support (for Linux, recommended NPTL)
19* Unix-like (Linux or BSD) system or Windows system
20
21Optionally for clwrapper (an OpenCL wrapper that replaces AMD Catalyst driver
22behaviour) requires:
23
24* libOpenCL.so or OpenCL.dll
25* OpenCL ICD (for example from AMD Catalyst driver)
26* AMD Catalyst driver or AMDGPU-PRO driver
27
28and documentation requires:
29
30* pod2man utility for Unix manuals
31* markdown_py utility for CLRX Documentation
32* Doxygen for CLRX API Documentation
33
34These utilities is working with the OpenCL kernel binaries compiled for the
35Radeon GPU's based on GCN 1.0/1.1/1.2 architecture. Any binaries compiled
36for older Radeons (VLIW architecture) has not been handled.
37
382. Compilation
39
40To build system you should create the build directory in source code package:
41
42  mkdir build
43
44and run:
45
46  cmake .. [cmake options]
47
48Optional CMake configuration options for build:
49
50CMAKE_BUILD_TYPE - type of build (Release, Debug, GCCSan, GCCSSP).
51CMAKE_INSTALL_PREFIX - prefix for installation (for example '/usr/local')
52BUILD_32BIT - build also 32-bit binaries
53BUILD_TESTS - build all tests
54BUILD_SAMPLES - build OpenCL samples
55BUILD_DOCUMENTATION - build project documentation (doxygen, unix manuals, user doc)
56BUILD_DOXYGEN - build doxygen documentation
57BUILD_MANUAL - build Unix manual pages
58BUILD_CLRXDOC - build CLRX user documentation
59BUILD_STATIC_EXE - build with statically linked executables
60GCC5CXX11NEWABI - build with new GCC5 C++11 ABI
61NO_STATIC - no static libraries
62NO_CLWRAPPER - do not build CLRXWrapper
63CPU_ARCH - target CPU architecture (in GCC parameter to -march, for MSVC
64  parameter to /arch:)
65OPENCL_DIST_DIR - an OpenCL directory distribution installation (optional)
66
67You can just add one or many of these options to cmake command:
68
69  cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
70
71or for Microsoft Visual C++ (for NMake):
72
73  cmake .. -G "NMake Makefiles" [cmake configuration options]
74
75or for Microsoft Visual C++ (for same Visual Studio)
76
77  cmake .. -G "Visual Studio XXXXXX [arch]" [cmake configuration options]
78
79where XXXX - version of Visual Studio (7, 14 2015, ...).
80arch - architecture (Win64, ARM) (optional).
81
82After creating Makefiles scripts you can compile project:
83
84  make or make -jX - where X is number of processors.
85
86or (for NMake)
87
88  nmake
89
90or just execute build option in Visual Studio.
91
92After building you can check whether project is working (if you will build tests):
93
94  ctest
95
962.1. Windows and MSVC
97
98CLRadeonExtender has been compiled under Windows 8.1 and Microsoft Visual Studio 2015
99Community version.
100
1012.2. FreeBSD
102
103Due to unknown reasons, the compilation under clang++ will be failed. We recommend to use
104gcc compiler to build the CLRadeonExtender. You should prepend cmake command by `CXX=g++`:
105`CXX=g++ cmake .. ....`.
106
1073. Installation
108
109Installation is easy. Just run command:
110
111  make install
112
113or (for NMake)
114
115  nmake install
116 
1174. clwrapper
118
119CLWrapper integrates the CLRX assembler with the AMD Catalyst driver by using
120wrapper mechanism and embeds an assembler to AMD OpenCL implementation.
121Building an assembler programs will be possible by passing an '-xasm' option which
122should be appended to build options, like following example:
123
124clBuildProgram(program, num_devices, devices, "-xasm", NULL, NULL);
125
126Installation is easy. However, it requires some changes on an OpenCL configuration:
127
128Remove amdocl64.icd and/or amdocl32.icd (if 32-bit system)
129from directory '/etc/OpenCL/vendors'
130(before, we recommend to make backup that directory).
131Create the 'clrx.icd' file on /etc/OpenCL/vendors/ with content: 'libCLRXWrapper.so'.
132That's all. Now you can call an assembler through clBuildProgram on your applications.
133
134Important Attention: CLWrapper make some changes on the program environment and changes
135behaviour of the OpenCL routines. This is still the experimental stuff and
136we recommend to not using its on the deployed/production systems.
137
138DO NOT FORGET to revert these changes before uninstallation.
139
1405. Uninstallation
141
142In the build directory is the 'install_manifest.txt' file that contains all installed files.
143You can remove these files by using command:
144
145  rm -f `cat install_manifest.txt`
146
147DO NOT FORGET to keep 'build' directory after installation.
Note: See TracBrowser for help on using the repository browser.