source: CLRX/CLRadeonExtender/trunk/INSTALL @ 3708

Last change on this file since 3708 was 3708, checked in by matszpk, 3 years ago

CLRadeonExtender: Update README.md and INSTALL: add instructions to build under MSVC.

File size: 4.5 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* GNU make tool or nmake or any build system supported by CMake
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.
27
28These utilities is working with the OpenCL kernel binaries compiled for the
29Radeon GPU's based on GCN 1.0/1.1/1.2 architecture. Any binaries compiled
30for older Radeons (VLIW architecture) has not been handled.
31
322. Compilation
33
34To build system you should create the build directory in source code package:
35
36  mkdir build
37
38and run:
39
40  cmake .. [cmake options]
41
42Optional CMake configuration options for build:
43
44CMAKE_BUILD_TYPE - type of build (Release, Debug, GCCSan, GCCSSP).
45CMAKE_INSTALL_PREFIX - prefix for installation (for example '/usr/local')
46BUILD_32BIT - build also 32-bit binaries
47BUILD_TESTS - build all tests
48BUILD_SAMPLES - build OpenCL samples
49BUILD_DOCUMENTATION - build project documentation (doxygen, unix manuals, user doc)
50BUILD_DOXYGEN - build doxygen documentation
51BUILD_MANUAL - build Unix manual pages
52BUILD_CLRXDOC - build CLRX user documentation
53BUILD_STATIC_EXE - build with statically linked executables
54GCC5CXX11NEWABI - build with new GCC5 C++11 ABI
55NO_STATIC - no static libraries
56NO_CLWRAPPER - do not build CLRXWrapper
57CPU_ARCH - target CPU architecture (in GCC parameter to -march, for MSVC
58  parameter to /arch:)
59OPENCL_DIST_DIR - an OpenCL directory distribution installation (optional)
60
61You can just add one or many of these options to cmake command:
62
63  cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
64
65or for Microsoft Visual C++ (for NMake):
66
67  cmake .. -G "NMake Makefiles" [cmake configuration options]
68
69or for Microsoft Visual C++ (for same Visual Studio)
70
71  cmake .. -G "Visual Studio XXXXXX [arch]" [cmake configuration options]
72
73where XXXX - version of Visual Studio (7, 14 2015, ...).
74arch - architecture (Win64, ARM) (optional).
75
76After creating Makefiles scripts you can compile project:
77
78  make or make -jX - where X is number of processors.
79
80or (for NMake)
81
82  nmake
83
84or just execute build option in Visual Studio.
85
86After building you can check whether project is working (if you will build tests):
87
88  ctest
89 
902.1. Windows and MSVC
91
92CLRadeonExtender has been compiled under Windows 8.1 and Microsoft Visual Studio 2015
93Community version.
94
953. Installation
96
97Installation is easy. Just run command:
98
99  make install
100
101or (for NMake)
102
103  nmake install
104 
1054. clwrapper
106
107CLWrapper integrates the CLRX assembler with the AMD Catalyst driver by using
108wrapper mechanism and embeds an assembler to AMD OpenCL implementation.
109Building an assembler programs will be possible by passing an '-xasm' option which
110should be appended to build options, like following example:
111
112clBuildProgram(program, num_devices, devices, "-xasm", NULL, NULL);
113
114Installation is easy. However, it requires some changes on an OpenCL configuration:
115
116Remove amdocl64.icd and/or amdocl32.icd (if 32-bit system)
117from directory '/etc/OpenCL/vendors'
118(before, we recommend to make backup that directory).
119Create the 'clrx.icd' file on /etc/OpenCL/vendors/ with content: 'libCLRXWrapper.so'.
120That's all. Now you can call an assembler through clBuildProgram on your applications.
121
122Important Attention: CLWrapper make some changes on the program environment and changes
123behaviour of the OpenCL routines. This is still the experimental stuff and
124we recommend to not using its on the deployed/production systems.
125
126DO NOT FORGET to revert these changes before uninstallation.
127
1285. Uninstallation
129
130In the build directory is the 'install_manifest.txt' file that contains all installed files.
131You can remove these files by using command:
132
133  rm -f `cat install_manifest.txt`
134
135DO NOT FORGET to keep 'build' directory after installation.
Note: See TracBrowser for help on using the repository browser.