Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
b8dbd4ca
提交
b8dbd4ca
authored
8月 30, 2024
作者:
Ricardo Vieira
提交者:
Ricardo Vieira
10月 11, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make all inplace rewrites happen at 50.x
上级
b248ebac
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
14 行增加
和
16 行删除
+14
-16
rewriting.py
pytensor/scan/rewriting.py
+1
-1
rewriting.py
pytensor/sparse/rewriting.py
+3
-3
basic.py
pytensor/tensor/random/rewriting/basic.py
+1
-1
blas.py
pytensor/tensor/rewriting/blas.py
+2
-3
blas_scipy.py
pytensor/tensor/rewriting/blas_scipy.py
+1
-1
elemwise.py
pytensor/tensor/rewriting/elemwise.py
+2
-3
subtensor.py
pytensor/tensor/rewriting/subtensor.py
+3
-3
rewriting.py
pytensor/typed_list/rewriting.py
+1
-1
没有找到文件。
pytensor/scan/rewriting.py
浏览文件 @
b8dbd4ca
...
@@ -2492,7 +2492,7 @@ optdb.register(
...
@@ -2492,7 +2492,7 @@ optdb.register(
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
"scan"
,
"scan"
,
position
=
7
5
,
position
=
50.
5
,
)
)
scan_eqopt1
.
register
(
"all_pushout_opt"
,
scan_seqopt1
,
"fast_run"
,
"scan"
)
scan_eqopt1
.
register
(
"all_pushout_opt"
,
scan_seqopt1
,
"fast_run"
,
"scan"
)
...
...
pytensor/sparse/rewriting.py
浏览文件 @
b8dbd4ca
...
@@ -210,7 +210,7 @@ pytensor.compile.optdb.register(
...
@@ -210,7 +210,7 @@ pytensor.compile.optdb.register(
),
),
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
60
,
position
=
50.1
,
)
)
...
@@ -239,9 +239,9 @@ def local_addsd_ccode(fgraph, node):
...
@@ -239,9 +239,9 @@ def local_addsd_ccode(fgraph, node):
pytensor
.
compile
.
optdb
.
register
(
pytensor
.
compile
.
optdb
.
register
(
"local_addsd_ccode"
,
"local_addsd_ccode"
,
WalkingGraphRewriter
(
local_addsd_ccode
),
WalkingGraphRewriter
(
local_addsd_ccode
),
# Must be after local_inplace_addsd_ccode at
6
0
# Must be after local_inplace_addsd_ccode at
70.
0
"fast_run"
,
"fast_run"
,
position
=
6
1
,
position
=
70.
1
,
)
)
...
...
pytensor/tensor/random/rewriting/basic.py
浏览文件 @
b8dbd4ca
...
@@ -60,7 +60,7 @@ optdb.register(
...
@@ -60,7 +60,7 @@ optdb.register(
in2out
(
random_make_inplace
,
ignore_newtrees
=
True
),
in2out
(
random_make_inplace
,
ignore_newtrees
=
True
),
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
9
9
,
position
=
50.
9
,
)
)
...
...
pytensor/tensor/rewriting/blas.py
浏览文件 @
b8dbd4ca
...
@@ -762,8 +762,6 @@ blas_optdb.register(
...
@@ -762,8 +762,6 @@ blas_optdb.register(
)
)
# After destroyhandler(49.5) but before we try to make elemwise things
# inplace (75)
blas_opt_inplace
=
in2out
(
blas_opt_inplace
=
in2out
(
local_inplace_gemm
,
local_inplace_gemv
,
local_inplace_ger
,
name
=
"blas_opt_inplace"
local_inplace_gemm
,
local_inplace_gemv
,
local_inplace_ger
,
name
=
"blas_opt_inplace"
)
)
...
@@ -773,7 +771,8 @@ optdb.register(
...
@@ -773,7 +771,8 @@ optdb.register(
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
"blas_opt_inplace"
,
"blas_opt_inplace"
,
position
=
70.0
,
# Before we try to make elemwise things inplace (70.5)
position
=
50.2
,
)
)
...
...
pytensor/tensor/rewriting/blas_scipy.py
浏览文件 @
b8dbd4ca
...
@@ -33,5 +33,5 @@ if have_fblas:
...
@@ -33,5 +33,5 @@ if have_fblas:
make_scipy_blas_destructive
,
make_scipy_blas_destructive
,
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
70.0
,
position
=
50.2
,
)
)
pytensor/tensor/rewriting/elemwise.py
浏览文件 @
b8dbd4ca
...
@@ -186,9 +186,8 @@ class InplaceElemwiseOptimizer(GraphRewriter):
...
@@ -186,9 +186,8 @@ class InplaceElemwiseOptimizer(GraphRewriter):
for
i
in
range
(
len
(
node
.
inputs
))
for
i
in
range
(
len
(
node
.
inputs
))
if
i
not
in
baseline
.
values
()
if
i
not
in
baseline
.
values
()
and
not
isinstance
(
node
.
inputs
[
i
],
Constant
)
and
not
isinstance
(
node
.
inputs
[
i
],
Constant
)
and
# the next line should not be costly most of the time.
# the next line should not be costly most of the time.
not
fgraph
.
has_destroyers
([
node
.
inputs
[
i
]])
and
not
fgraph
.
has_destroyers
([
node
.
inputs
[
i
]])
and
node
.
inputs
[
i
]
not
in
protected_inputs
and
node
.
inputs
[
i
]
not
in
protected_inputs
]
]
else
:
else
:
...
@@ -362,7 +361,7 @@ compile.optdb.register(
...
@@ -362,7 +361,7 @@ compile.optdb.register(
"inplace_elemwise_optimizer"
,
"inplace_elemwise_optimizer"
,
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
7
5
,
position
=
50.
5
,
)
)
...
...
pytensor/tensor/rewriting/subtensor.py
浏览文件 @
b8dbd4ca
...
@@ -1307,7 +1307,7 @@ compile.optdb.register(
...
@@ -1307,7 +1307,7 @@ compile.optdb.register(
),
),
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
60
,
position
=
50.1
,
)
)
...
@@ -1329,7 +1329,7 @@ compile.optdb.register(
...
@@ -1329,7 +1329,7 @@ compile.optdb.register(
),
),
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
60
,
position
=
70.6
,
)
)
...
@@ -1355,7 +1355,7 @@ compile.optdb.register(
...
@@ -1355,7 +1355,7 @@ compile.optdb.register(
),
),
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
60
,
position
=
70.6
,
)
)
...
...
pytensor/typed_list/rewriting.py
浏览文件 @
b8dbd4ca
...
@@ -22,5 +22,5 @@ optdb.register(
...
@@ -22,5 +22,5 @@ optdb.register(
),
),
"fast_run"
,
"fast_run"
,
"inplace"
,
"inplace"
,
position
=
60
,
position
=
50.1
,
)
)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论