Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
aadd0e99
提交
aadd0e99
authored
9月 30, 2012
作者:
Matthew Rocklin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PEP8 changes in tensor/io
上级
91a34f8e
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
5 行删除
+6
-5
io.py
theano/tensor/io.py
+5
-4
test_mpi.py
theano/tensor/tests/test_mpi.py
+1
-1
没有找到文件。
theano/tensor/io.py
浏览文件 @
aadd0e99
...
@@ -49,8 +49,7 @@ class LoadFromDisk(Op):
...
@@ -49,8 +49,7 @@ class LoadFromDisk(Op):
out
[
0
][
0
]
=
result
out
[
0
][
0
]
=
result
def
__str__
(
self
):
def
__str__
(
self
):
return
"Load{dtype:
%
s, broadcastable:
%
s, mmep:
%
s}"
%
self
.
_info
return
"Load{dtype:
%
s, broadcastable:
%
s, mmep:
%
s}"
%
self
.
_info
def
load
(
path
,
dtype
,
broadcastable
,
mmap_mode
=
None
):
def
load
(
path
,
dtype
,
broadcastable
,
mmap_mode
=
None
):
"""
"""
...
@@ -129,7 +128,7 @@ class MPIRecv(Op):
...
@@ -129,7 +128,7 @@ class MPIRecv(Op):
out
[
1
][
0
]
=
data
out
[
1
][
0
]
=
data
def
__str__
(
self
):
def
__str__
(
self
):
return
"MPIRecv{source:
%
d, tag:
%
d, shape:
%
s, dtype:
%
s}"
%
self
.
_info
return
"MPIRecv{source:
%
d, tag:
%
d, shape:
%
s, dtype:
%
s}"
%
self
.
_info
def
infer_shape
(
self
,
node
,
shapes
):
def
infer_shape
(
self
,
node
,
shapes
):
return
[
None
,
self
.
shape
]
return
[
None
,
self
.
shape
]
...
@@ -212,7 +211,7 @@ class MPISend(Op):
...
@@ -212,7 +211,7 @@ class MPISend(Op):
out
[
0
][
0
]
=
request
out
[
0
][
0
]
=
request
def
__str__
(
self
):
def
__str__
(
self
):
return
"MPISend{dest:
%
d, tag:
%
d}"
%
self
.
_info
return
"MPISend{dest:
%
d, tag:
%
d}"
%
self
.
_info
class
MPISendWait
(
Op
):
class
MPISendWait
(
Op
):
"""
"""
...
@@ -247,11 +246,13 @@ class MPISendWait(Op):
...
@@ -247,11 +246,13 @@ class MPISendWait(Op):
def
isend
(
var
,
dest
,
tag
):
def
isend
(
var
,
dest
,
tag
):
return
MPISend
(
dest
,
tag
)(
var
)
return
MPISend
(
dest
,
tag
)(
var
)
def
send
(
var
,
dest
,
tag
):
def
send
(
var
,
dest
,
tag
):
return
MPISendWait
(
tag
)(
isend
(
var
,
dest
,
tag
))
return
MPISendWait
(
tag
)(
isend
(
var
,
dest
,
tag
))
def
irecv
(
shape
,
dtype
,
source
,
tag
):
def
irecv
(
shape
,
dtype
,
source
,
tag
):
return
MPIRecv
(
source
,
tag
,
shape
,
dtype
)()
return
MPIRecv
(
source
,
tag
,
shape
,
dtype
)()
def
recv
(
shape
,
dtype
,
source
,
tag
):
def
recv
(
shape
,
dtype
,
source
,
tag
):
return
MPIRecvWait
(
tag
)(
*
irecv
(
shape
,
dtype
,
source
,
tag
))
return
MPIRecvWait
(
tag
)(
*
irecv
(
shape
,
dtype
,
source
,
tag
))
...
...
theano/tensor/tests/test_mpi.py
浏览文件 @
aadd0e99
...
@@ -61,7 +61,7 @@ def test_mpi_tag_ordering():
...
@@ -61,7 +61,7 @@ def test_mpi_tag_ordering():
nodes
=
f
.
maker
.
linker
.
make_all
()[
-
1
]
nodes
=
f
.
maker
.
linker
.
make_all
()[
-
1
]
assert
all
(
node
.
op
.
tag
==
tag
assert
all
(
node
.
op
.
tag
==
tag
for
node
,
tag
in
zip
(
nodes
,
(
11
,
12
,
13
,
11
,
12
,
13
)))
for
node
,
tag
in
zip
(
nodes
,
(
11
,
12
,
13
,
11
,
12
,
13
)))
def
test_mpi_schedule
():
def
test_mpi_schedule
():
x
=
theano
.
tensor
.
matrix
(
'x'
)
x
=
theano
.
tensor
.
matrix
(
'x'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论