为了使`OpKernel`的计算过程书写更加简单,并且CPU、CUDA的代码可以复用,我们通常借助 Eigen unsupported Tensor模块来实现`Compute`接口。关于在PaddlePaddle中如何使用Eigen库,请参考[使用文档](https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/dev/use_eigen_cn.md)。
- 例如:`Suggested Fix:If your classifier expects one-hot encoding label,check your n_classes argument to the estimatorand/or the shape of your label.Otherwise, check the shape of your label.`
如果并非必要或者简洁的描述即可表达清楚以上要点,根据情况书写亦可。
#### FAQ 典型问题
1. 无报错信息或报错信息过于简单,不能给用户提供有效的提示!
问题示例1 :未写提示信息
```
PADDLE_ENFORCE(ctx->HasInput("X"), "");
```
问题示例2 :提示信息过于简单
```
PADDLE_ENFORCE(i != nullptr, "i must be set"); // i是什么?
```
2. 在报错信息中使用开发人员定义的变量缩写,不易理解!
问题示例:
```
PADDLE_ENFORCE(forward_pd != nullptr,
"Fail to find eltwise_fwd_pd in device context"); //eltwise_fwd_pd用户可能看不懂
<td> Whether to Compile with distributed version </td>
<td> OFF </td>
</tr>
<tr>
<td> WITH_MKL </td>
<td> Whether to uses the MKL math library, if not, using OpenBLAS </td>
<td> ON </td>
</tr>
<tr>
<td> WITH_RDMA </td>
<td> Whether to compile the relevant parts that supports RDMA </td>
...
...
@@ -244,76 +239,20 @@ PaddePaddle implements references to various BLAS/CUDA/cuDNN libraries by specif
</thead>
<tbody>
<tr>
<td> paddlepaddle==[version code] such as paddlepaddle==1.0.1 (download version 1.0.1 which only supports CPU PaddlePaddle)</td>
<td> paddlepaddle==[version code] such as paddlepaddle==1.2.0 </td>
<td> Only support the corresponding version of the CPU PaddlePaddle, please refer to <ahref=https://pypi.org/project/paddlepaddle/#history>Pypi</a> for the specific version. </td>
</tr>
<tr>
<td> paddlepaddle-gpu==1.0.1 </td>
<td> Using version 1.0.1 compiled with CUDA 9.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==1.0.1.post87 </td>
<td> Using version 1.0.1 compiled with CUDA 8.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==1.0.1.post85 </td>
<td> Using version 1.0.1 compiled with CUDA 8.0 and cuDNN 5 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==1.0.0 </td>
<td> Using version 1.0.0 compiled with CUDA 9.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==1.0.0.post87 </td>
<td> Using version 1.0.0 compiled with CUDA 8.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==1.0.0.post85 </td>
<td> Using version 1.0.0 compiled with CUDA 8.0 and cuDNN 5 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.15.0 </td>
<td> Using version 0.15.0 compiled with CUDA 9.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.15.0.post87 </td>
<td> Using version 0.15.0 compiled with CUDA 8.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.15.0.post85 </td>
<td> Using version 0.15.0 compiled with CUDA 8.0 and cuDNN 5 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.14.0 </td>
<td> Using version 0.15.0 compiled with CUDA 9.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.14.0.post87 </td>
<td> Using version 0.15.0 compiled with CUDA 8.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.14.0.post85 </td>
<td> Using version 0.15.0 compiled with CUDA 8.0 and cuDNN 5 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.13.0 </td>
<td> Using version 0.13.0 compiled with CUDA 9.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.12.0 </td>
<td> Using version 0.12.0 compiled with CUDA 8.0 and cuDNN 5 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.11.0.post87 </td>
<td> Using version 0.11.0 compiled with CUDA 8.0 and cuDNN 7 </td>
<td> paddlepaddle-gpu==1.2.0 </td>
<td> Using version 1.2.0 compiled with CUDA 9.0 and cuDNN 7 </td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.11.0.post85</td>
<td> Using version 0.11.0 compiled with CUDA 8.0 and cuDNN 5</td>
<td> paddlepaddle-gpu==1.2.0.post87</td>
<td> Using version 1.2.0 compiled with CUDA 8.0 and cuDNN 7</td>
</tr>
<tr>
<td> paddlepaddle-gpu==0.11.0</td>
<td> Using version 0.11.0 compiled with CUDA 7.5 and cuDNN 5 </td>
<td> paddlepaddle-gpu==1.2.0.post85</td>
<td> Using version 1.2.0 compiled with CUDA 8.0 and cuDNN 5 </td>
</tr>
</tbody>
</table>
...
...
@@ -322,6 +261,7 @@ PaddePaddle implements references to various BLAS/CUDA/cuDNN libraries by specif
You can find various distributions of PaddlePaddle-gpu in [the Release History](https://pypi.org/project/paddlepaddle-gpu/#history).
Please note that: paddlepaddle-gpu==1.3.0 in windows, will download package compiled with CUDA 8.0 and cuDNN 5
***
<aname="dockers"></a>
...
...
@@ -382,81 +322,105 @@ You can find the docker image for each release of PaddlePaddle in the [DockerHub