Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
12cf4a49
提交
12cf4a49
authored
5月 20, 2022
作者:
Brandon T. Willard
提交者:
Brandon T. Willard
6月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable wraparound checks in scan_perform.pyx
上级
6b4c933d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
3 行增加
和
11 行删除
+3
-11
scan_perform.c
aesara/scan/c_code/scan_perform.c
+0
-0
scan_perform.pyx
aesara/scan/scan_perform.pyx
+2
-10
scan_perform_ext.py
aesara/scan/scan_perform_ext.py
+1
-1
没有找到文件。
aesara/scan/c_code/scan_perform.c
浏览文件 @
12cf4a49
This source diff could not be displayed because it is too large. You can
view the blob
instead.
aesara/scan/scan_perform.pyx
浏览文件 @
12cf4a49
...
@@ -62,7 +62,7 @@ numpy.import_array()
...
@@ -62,7 +62,7 @@ numpy.import_array()
def get_version():
def get_version():
return 0.32
2
return 0.32
3
@cython.cdivision(True)
@cython.cdivision(True)
...
@@ -70,8 +70,7 @@ cdef inline unsigned int pymod(int a, unsigned int b):
...
@@ -70,8 +70,7 @@ cdef inline unsigned int pymod(int a, unsigned int b):
return (a % (<int>b) + <int>b) % b
return (a % (<int>b) + <int>b) % b
# TODO: We need to get rid of the negative indexing performed with `pos` and `l`.
@cython.wraparound(False)
# @cython.wraparound(False)
@cython.cdivision(True)
@cython.cdivision(True)
@cython.boundscheck(False)
@cython.boundscheck(False)
def perform(
def perform(
...
@@ -260,7 +259,6 @@ def perform(
...
@@ -260,7 +259,6 @@ def perform(
# Put in the values of the initial state
# Put in the values of the initial state
outer_outputs_idx[0] = outer_outputs_idx_0[:store_steps[idx]]
outer_outputs_idx[0] = outer_outputs_idx_0[:store_steps[idx]]
if idx > n_mit_mot:
if idx > n_mit_mot:
# TODO FIXME: Do not use wrapped indexing!
l = - mintaps[idx]
l = - mintaps[idx]
outer_outputs_idx_0[:l] = outer_inputs[<unsigned int>(seqs_arg_offset + idx)][:l]
outer_outputs_idx_0[:l] = outer_inputs[<unsigned int>(seqs_arg_offset + idx)][:l]
else:
else:
...
@@ -271,18 +269,12 @@ def perform(
...
@@ -271,18 +269,12 @@ def perform(
if n_steps == 0:
if n_steps == 0:
for idx in range(n_outs, n_outs + n_nit_sot):
for idx in range(n_outs, n_outs + n_nit_sot):
if outs_is_tensor[idx]:
if outs_is_tensor[idx]:
# TODO FIXME: Why have an `outs_is_tensor` when you can access
# the node directly?
# (The answer is that you shouldn't have a `node` object to
# access, because it's not going to produce a very efficient
# Cython function!)
outer_outputs[idx][0] = numpy.empty((0,) * outer_output_ndims[idx], dtype=outer_output_dtypes[idx])
outer_outputs[idx][0] = numpy.empty((0,) * outer_output_ndims[idx], dtype=outer_output_dtypes[idx])
else:
else:
outer_outputs[idx][0] = None
outer_outputs[idx][0] = None
return 0.0, 0
return 0.0, 0
for idx in range(lenpos):
for idx in range(lenpos):
# TODO FIXME: Do not use wrapped indexing!
pos[idx] = pymod(-mintaps[idx], store_steps[idx])
pos[idx] = pymod(-mintaps[idx], store_steps[idx])
offset = nit_sot_arg_offset + n_nit_sot
offset = nit_sot_arg_offset + n_nit_sot
...
...
aesara/scan/scan_perform_ext.py
浏览文件 @
12cf4a49
...
@@ -23,7 +23,7 @@ if not config.cxx:
...
@@ -23,7 +23,7 @@ if not config.cxx:
_logger
=
logging
.
getLogger
(
"aesara.scan.scan_perform"
)
_logger
=
logging
.
getLogger
(
"aesara.scan.scan_perform"
)
version
=
0.32
2
# must match constant returned in function get_version()
version
=
0.32
3
# must match constant returned in function get_version()
need_reload
=
False
need_reload
=
False
scan_perform
:
Optional
[
ModuleType
]
=
None
scan_perform
:
Optional
[
ModuleType
]
=
None
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论