Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
1390cc39
Unverified
提交
1390cc39
authored
10月 25, 2022
作者:
Anirudh
提交者:
GitHub
10月 25, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use time.perf_counter for aesara.function timing results
上级
471657a5
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
11 行删除
+11
-11
types.py
aesara/compile/function/types.py
+11
-11
没有找到文件。
aesara/compile/function/types.py
浏览文件 @
1390cc39
...
...
@@ -824,7 +824,7 @@ class Function:
self
[
i
]
=
value
profile
=
self
.
profile
t0
=
time
.
time
()
t0
=
time
.
perf_counter
()
output_subset
=
kwargs
.
pop
(
"output_subset"
,
None
)
if
output_subset
is
not
None
and
self
.
output_keys
is
not
None
:
...
...
@@ -965,7 +965,7 @@ class Function:
)
# Do the actual work
t0_fn
=
time
.
time
()
t0_fn
=
time
.
perf_counter
()
try
:
outputs
=
(
self
.
vm
()
...
...
@@ -991,7 +991,7 @@ class Function:
# old-style linkers raise their own exceptions
raise
dt_fn
=
time
.
time
()
-
t0_fn
dt_fn
=
time
.
perf_counter
()
-
t0_fn
self
.
maker
.
mode
.
fn_time
+=
dt_fn
if
profile
:
profile
.
vm_call_time
+=
dt_fn
...
...
@@ -1039,7 +1039,7 @@ class Function:
# grep for 'PROFILE_CODE'
#
dt_call
=
time
.
time
()
-
t0
dt_call
=
time
.
perf_counter
()
-
t0
aesara
.
compile
.
profiling
.
total_fct_exec_time
+=
dt_call
self
.
maker
.
mode
.
call_time
+=
dt_call
if
profile
:
...
...
@@ -1395,7 +1395,7 @@ class FunctionMaker:
):
try
:
start_rewriter
=
time
.
time
()
start_rewriter
=
time
.
perf_counter
()
rewriter_profile
=
None
rewrite_time
=
None
...
...
@@ -1406,7 +1406,7 @@ class FunctionMaker:
):
rewriter_profile
=
rewriter
(
fgraph
)
end_rewriter
=
time
.
time
()
end_rewriter
=
time
.
perf_counter
()
rewrite_time
=
end_rewriter
-
start_rewriter
_logger
.
debug
(
f
"Rewriting took {rewrite_time:f} seconds"
)
...
...
@@ -1416,7 +1416,7 @@ class FunctionMaker:
# If the rewriter got interrupted
if
rewrite_time
is
None
:
end_rewriter
=
time
.
time
()
end_rewriter
=
time
.
perf_counter
()
rewrite_time
=
end_rewriter
-
start_rewriter
aesara
.
compile
.
profiling
.
total_graph_rewrite_time
+=
rewrite_time
...
...
@@ -1645,7 +1645,7 @@ class FunctionMaker:
defaults
.
append
((
required
,
refeed
,
storage
))
# Get a function instance
start_linker
=
time
.
time
()
start_linker
=
time
.
perf_counter
()
start_import_time
=
aesara
.
link
.
c
.
cmodule
.
import_time
with
config
.
change_flags
(
traceback__limit
=
config
.
traceback__compile_limit
):
...
...
@@ -1653,7 +1653,7 @@ class FunctionMaker:
input_storage
=
input_storage_lists
,
storage_map
=
storage_map
)
end_linker
=
time
.
time
()
end_linker
=
time
.
perf_counter
()
linker_time
=
end_linker
-
start_linker
aesara
.
compile
.
profiling
.
total_time_linker
+=
linker_time
...
...
@@ -1725,7 +1725,7 @@ def orig_function(
"""
t1
=
time
.
time
()
t1
=
time
.
perf_counter
()
mode
=
aesara
.
compile
.
mode
.
get_mode
(
mode
)
inputs
=
list
(
map
(
convert_function_input
,
inputs
))
...
...
@@ -1758,7 +1758,7 @@ def orig_function(
with
config
.
change_flags
(
compute_test_value
=
"off"
):
fn
=
m
.
create
(
defaults
)
finally
:
t2
=
time
.
time
()
t2
=
time
.
perf_counter
()
if
fn
and
profile
:
profile
.
compile_time
+=
t2
-
t1
# TODO: append
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论