@@ -11,11 +11,12 @@ You can download PaddlePaddle from the [github source](https://github.com/gangli
11
11
12
12
``` bash
13
13
git clone https://github.com/baidu/Paddle paddle
14
+ cd paddle
14
15
```
15
16
16
17
## <span id =" requirements " >Requirements</span >
17
18
18
- To compile the source code, your computer must be equipped with GCC >=4.6 or Clang Compiler .
19
+ To compile the source code, your computer must be equipped with GCC >=4.6 or Clang compiler .
19
20
### Dependencies
20
21
21
22
- ** CMake** : version >= 2.8
@@ -27,17 +28,17 @@ To compile the source code, your computer must be equipped with GCC >=4.6 or Cla
27
28
28
29
PaddlePaddle supports some build options. To enable it, first you need to install the related libraries.
29
30
30
- Optional | Description
31
- ------------ | :-----------
32
- **WITH_GPU** | Compile with GPU mode.
33
- **WITH_DOUBLE ** | Compile with double precision floating-point, default: single precision. |
34
- **WITH_GLOG ** | Compile with glog. If not found , default: an internal log implementation.
35
- **WITH_GFLAGS ** | Compile with gflags . If not found, default: an internal flag implementation.
36
- **WITH_TESTING ** | Compile with gtest for PaddlePaddle's unit testing.
37
- **WITH_DOC ** | Compile to generate PaddlePaddle's docs, default: disabled (OFF).
38
- **WITH_SWIG_PY ** | Compile with python predict API , default: disabled (OFF).
39
- **WITH_STYLE_CHECK** | Compile with code style check , default: enabled (ON).
40
- |
31
+
32
+ | Optional | Description |
33
+ | -------------------- | :--------------------------------------------------------------------------- |
34
+ | ** WITH_GPU ** | Compile with GPU mode. |
35
+ | ** WITH_DOUBLE ** | Compile with double precision floating-point , default: single precision. |
36
+ | ** WITH_GLOG ** | Compile with glog . If not found, default: an internal log implementation. |
37
+ | ** WITH_GFLAGS ** | Compile with gflags. If not found, default: an internal flag implementation. |
38
+ | ** WITH_TESTING ** | Compile with gtest for PaddlePaddle's unit testing. |
39
+ | ** WITH_DOC ** | Compile to generate PaddlePaddle's docs , default: disabled (OFF). |
40
+ | ** WITH_SWIG_PY ** | Compile with python predict API , default: disabled (OFF). |
41
+ | ** WITH_STYLE_CHECK ** | Compile with code style check, default: enabled (ON). |
41
42
42
43
** Note:**
43
44
- The GPU version works best with Cuda Toolkit 7.5 and cuDNN v5.
@@ -118,11 +119,10 @@ As a simple example, consider the following:
118
119
sudo tar -xzf cudnn-7.5-linux-x64-v5.1.tgz -C /usr/local
119
120
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
120
121
```
121
- Then you need to set LD\_LIBRARY\_PATH, CUDA\_HOME and PATH environment variables in ~/.bashrc.
122
+ Then you need to set LD\_LIBRARY\_PATH, PATH environment variables in ~/.bashrc.
122
123
123
124
```bash
124
125
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
125
- export CUDA_HOME=/usr/local/cuda
126
126
export PATH=/usr/local/cuda/bin:$PATH
127
127
```
128
128
@@ -158,13 +158,12 @@ As a simple example, consider the following:
158
158
cmake .. -DWITH_GPU=ON -DWITH_DOC=ON -DWITH_SWIG_PY=ON
159
159
` ` `
160
160
161
- Finally, you can download source code and build:
161
+ Finally, you can build PaddlePaddle :
162
162
163
163
` ` ` bash
164
164
# you can add build option here, such as:
165
165
cmake .. -DWITH_GPU=ON -DWITH_DOC=OFF -DCMAKE_INSTALL_PREFIX=< path to install>
166
- # please use sudo make install, if you want
167
- # to install PaddlePaddle into the system
166
+ # please use sudo make install, if you want to install PaddlePaddle into the system
168
167
make -j ` nproc` && make install
169
168
# set PaddlePaddle installation path in ~/.bashrc
170
169
export PATH=< path to install> /bin:$PATH
@@ -240,7 +239,7 @@ easy_install pip
240
239
sudo tar -xzf cudnn-7.5-osx-x64-v5.0-ga.tgz -C /usr/local
241
240
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
242
241
` ` `
243
- 2. Then you need to set DYLD\_ LIBRARY\_ PATH, CUDA \_ HOME and PATH environment variables in ~ /.bashrc.
242
+ 2. Then you need to set DYLD\_ LIBRARY\_ PATH, PATH environment variables in ~ /.bashrc.
244
243
245
244
` ` ` bash
246
245
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
@@ -289,8 +288,6 @@ make -j `nproc` && make install
289
288
# set PaddlePaddle installation path in ~/.bashrc
290
289
export PATH=<installation path>/bin:$PATH
291
290
```
292
-
293
-
294
291
**Note:**
295
292
296
293
If you set `WITH_SWIG_PY=ON`, related python dependencies also need to be installed.
0 commit comments