Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
6633f6fd
提交
6633f6fd
authored
12月 13, 2013
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add doc about OpenMP ops.
上级
ae997472
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
27 行增加
和
2 行删除
+27
-2
other_ops.txt
doc/extending/other_ops.txt
+27
-0
extending_theano.txt
doc/tutorial/extending_theano.txt
+0
-2
没有找到文件。
doc/extending/other_ops.txt
浏览文件 @
6633f6fd
...
...
@@ -183,3 +183,30 @@ distribution here::
.. note::
In all cases, you must reuse the same interface as NumPy for compatibility.
.. _openmp_ops:
OpenMP Ops
==========
To allow consistent interface of Ops that support OpenMP, we have some
helper code. Doing this also allow to enable/disable OpenMP globally
or per op for fine grin control.
Your Op need to inherit from ``theano.gof.OpenMPOp``. If it override
the ``__init__()`` method, it must have an ``openmp=None`` parameter
and must call ``super(MyOpClass, self).__init__(openmp=openmp)``.
The ``OpenMPOp`` class also implement ``c_compile_args`` and
``make_thunk``. This make it add the correct g++ flag to compile with
OpenMP. It also disable OpenMP and print a warning if the version of
g++ don't support it.
The Theano flag ``openmp`` is currently False by default as we don't
have code that get speed up with it. The only current implementation
is ConvOp. It speed up some cases, but slow down others. That is why
we disable it by default. But we have all the code to have it enabled
by default if there is more then 1 cores and that the environment
variable OMP_NUM_THREADS isn't 1. This allow Theano to respect the
current convention.
doc/tutorial/extending_theano.txt
浏览文件 @
6633f6fd
...
...
@@ -439,8 +439,6 @@ The section :ref:`Other ops <other_ops>` include more instruction for specific c
- :ref:`sparse ops <sparse_ops>`
- :ref:`random ops <random_ops>`.
If you want c code speed without doing c code for a new ops, you can check using Numba with Theano :
See :ref:`metadocumentation`, for some information on how to generate
the documentation.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论