Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
9fc24713
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9fc24713
编写于
11月 10, 2017
作者:
T
Travis CI
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Deploy to GitHub Pages:
3d6ca6ad
上级
9c55d7e0
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
2 addition
and
2 deletion
+2
-2
develop/doc_cn/_sources/howto/dev/new_op_cn.md.txt
develop/doc_cn/_sources/howto/dev/new_op_cn.md.txt
+1
-1
develop/doc_cn/howto/dev/new_op_cn.html
develop/doc_cn/howto/dev/new_op_cn.html
+1
-1
未找到文件。
develop/doc_cn/_sources/howto/dev/new_op_cn.md.txt
浏览文件 @
9fc24713
...
@@ -214,7 +214,7 @@ MulOp(const std::string &type, const framework::VariableNameMap &inputs,
...
@@ -214,7 +214,7 @@ MulOp(const std::string &type, const framework::VariableNameMap &inputs,
```cpp
```cpp
// if use Eigen unsupported module before include head files
// if use Eigen unsupported module before include head files
#define EIGEN_USE_GPU
//
#define EIGEN_USE_GPU
namespace ops = paddle::operators;
namespace ops = paddle::operators;
REGISTER_OP_GPU_KERNEL(mul, ops::MulKernel<paddle::platform::GPUPlace, float>);
REGISTER_OP_GPU_KERNEL(mul, ops::MulKernel<paddle::platform::GPUPlace, float>);
...
...
develop/doc_cn/howto/dev/new_op_cn.html
浏览文件 @
9fc24713
...
@@ -394,7 +394,7 @@ Kernel实现 | CPU、GPU共享Kernel实现在<code class="docutils literal
...
@@ -394,7 +394,7 @@ Kernel实现 | CPU、GPU共享Kernel实现在<code class="docutils literal
<li>
请注意,如果GPU Kernel的实现基于Eigen unsupported模块,那么在
<code
class=
"docutils literal"
><span
class=
"pre"
>
.cu
</span></code>
的开始请加上宏定义
<code
class=
"docutils literal"
><span
class=
"pre"
>
#define
</span>
<span
class=
"pre"
>
EIGEN_USE_GPU
</span></code>
,代码示例如下:
</li>
<li>
请注意,如果GPU Kernel的实现基于Eigen unsupported模块,那么在
<code
class=
"docutils literal"
><span
class=
"pre"
>
.cu
</span></code>
的开始请加上宏定义
<code
class=
"docutils literal"
><span
class=
"pre"
>
#define
</span>
<span
class=
"pre"
>
EIGEN_USE_GPU
</span></code>
,代码示例如下:
</li>
</ul>
</ul>
<div
class=
"highlight-cpp"
><div
class=
"highlight"
><pre><span></span><span
class=
"c1"
>
// if use Eigen unsupported module before include head files
</span>
<div
class=
"highlight-cpp"
><div
class=
"highlight"
><pre><span></span><span
class=
"c1"
>
// if use Eigen unsupported module before include head files
</span>
<span
class=
"c
p"
>
#define EIGEN_USE_GPU
</span>
<span
class=
"c
1"
>
//
#define EIGEN_USE_GPU
</span>
<span
class=
"k"
>
namespace
</span>
<span
class=
"n"
>
ops
</span>
<span
class=
"o"
>
=
</span>
<span
class=
"n"
>
paddle
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
operators
</span><span
class=
"p"
>
;
</span>
<span
class=
"k"
>
namespace
</span>
<span
class=
"n"
>
ops
</span>
<span
class=
"o"
>
=
</span>
<span
class=
"n"
>
paddle
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
operators
</span><span
class=
"p"
>
;
</span>
<span
class=
"n"
>
REGISTER_OP_GPU_KERNEL
</span><span
class=
"p"
>
(
</span><span
class=
"n"
>
mul
</span><span
class=
"p"
>
,
</span>
<span
class=
"n"
>
ops
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
MulKernel
</span><span
class=
"o"
>
<
</span><span
class=
"n"
>
paddle
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
platform
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
GPUPlace
</span><span
class=
"p"
>
,
</span>
<span
class=
"kt"
>
float
</span><span
class=
"o"
>
>
</span><span
class=
"p"
>
);
</span>
<span
class=
"n"
>
REGISTER_OP_GPU_KERNEL
</span><span
class=
"p"
>
(
</span><span
class=
"n"
>
mul
</span><span
class=
"p"
>
,
</span>
<span
class=
"n"
>
ops
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
MulKernel
</span><span
class=
"o"
>
<
</span><span
class=
"n"
>
paddle
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
platform
</span><span
class=
"o"
>
::
</span><span
class=
"n"
>
GPUPlace
</span><span
class=
"p"
>
,
</span>
<span
class=
"kt"
>
float
</span><span
class=
"o"
>
>
</span><span
class=
"p"
>
);
</span>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录