Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2ba58c0c
提交
2ba58c0c
authored
8月 29, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added doc about 16-bit integer and remove doc about shared_var.value as this is removed.
上级
be622607
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
1 行增加
和
21 行删除
+1
-21
adding.txt
doc/tutorial/adding.txt
+1
-0
aliasing.txt
doc/tutorial/aliasing.txt
+0
-21
没有找到文件。
doc/tutorial/adding.txt
浏览文件 @
2ba58c0c
...
@@ -154,6 +154,7 @@ by :ref:`broadcasting <libdoc_tensor_broadcastable>`.
...
@@ -154,6 +154,7 @@ by :ref:`broadcasting <libdoc_tensor_broadcastable>`.
The following types are available:
The following types are available:
* **byte**: ``bscalar, bvector, bmatrix, brow, bcol, btensor3, btensor4``
* **byte**: ``bscalar, bvector, bmatrix, brow, bcol, btensor3, btensor4``
* **16-bit integers**: ``wscalar, wvector, wmatrix, wrow, wcol, wtensor3, wtensor4``
* **32-bit integers**: ``iscalar, ivector, imatrix, irow, icol, itensor3, itensor4``
* **32-bit integers**: ``iscalar, ivector, imatrix, irow, icol, itensor3, itensor4``
* **64-bit integers**: ``lscalar, lvector, lmatrix, lrow, lcol, ltensor3, ltensor4``
* **64-bit integers**: ``lscalar, lvector, lmatrix, lrow, lcol, ltensor3, ltensor4``
* **float**: ``fscalar, fvector, fmatrix, frow, fcol, ftensor3, ftensor4``
* **float**: ``fscalar, fvector, fmatrix, frow, fcol, ftensor3, ftensor4``
...
...
doc/tutorial/aliasing.txt
浏览文件 @
2ba58c0c
...
@@ -217,27 +217,6 @@ be costly. Here are a few tips to ensure fast and efficient use of GPU memory a
...
@@ -217,27 +217,6 @@ be costly. Here are a few tips to ensure fast and efficient use of GPU memory a
here: :ref:`libdoc_cuda_var`)
here: :ref:`libdoc_cuda_var`)
Retrieving and Assigning via the ``.value`` Property
------------------------------------------------
``Shared`` variables have a ``.value`` property that is connected to ``get_value``
and ``set_value``. The borrowing behaviour of the property is controlled by a
boolean configuration variable ``config.shared.value_borrows``, which currently
defaults to *True*. If that variable is *True* then an assignment like ``s.value=v``
is equivalent to ``s.set_value(v, borrow=True)``, and a retrieval like ``print
s.value`` is equivalent to ``print s.get_value(borrow=True)``. Likewise,
if ``config.shared.value_borrows`` is *False*, then the borrow parameter that the ``.value`` property
passes to ``set_value`` and ``get_value`` is *False*.
The *True* default value of ``config.shared.value_borrows`` means that
aliasing can sometimes happen and sometimes not, which can be confusing.
Be aware that the default value may be changed to *False* sometime in the
not-to-distant future. This change will create more copies, and potentially slow
down code that accesses ``.value`` attributes inside tight loops. To avoid this
potential impact on your code, use the ``.get_value`` and ``.set_value`` methods
directly with appropriate flags.
Borrowing when Constructing Function Objects
Borrowing when Constructing Function Objects
============================================
============================================
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论