提交 d7c00a98 authored 作者: Frederic Bastien's avatar Frederic Bastien

Add in the library doc the content of io.py

上级 488df15e
...@@ -24,3 +24,4 @@ They are grouped into the following sections: ...@@ -24,3 +24,4 @@ They are grouped into the following sections:
signal/index signal/index
utils utils
extra_ops extra_ops
io
===================================================================
:mod:`tensor.io` -- Tensor IO Ops
===================================================================
.. module:: tensor.io
:platform: Unix, Windows
:synopsis: Tensor IO Ops
.. moduleauthor:: LISA
File operation
==============
- Load from disk with the function :func:`load <theano.tensor.io.load>` and its associated op :class:`LoadFromDisk <theano.tensor.io.LoadFromDisk>`
MPI operation
=============
- Non-blocking transfer: :func:`isend <theano.tensor.io.isend>` and :func:`irecv <theano.tensor.io.irecv>`.
- Blocking transfer: :func:`send <theano.tensor.io.send>` and :func:`recv <theano.tensor.io.recv>`
Details
=======
.. automodule:: theano.tensor.io
:members:
...@@ -256,18 +256,30 @@ class MPISendWait(Op): ...@@ -256,18 +256,30 @@ class MPISendWait(Op):
def isend(var, dest, tag): def isend(var, dest, tag):
"""
Non blocking send
"""
return MPISend(dest, tag)(var) return MPISend(dest, tag)(var)
def send(var, dest, tag): def send(var, dest, tag):
"""
blocking send
"""
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):
"""
non-blocking receive
"""
return MPIRecv(source, tag, shape, dtype)() return MPIRecv(source, tag, shape, dtype)()
def recv(shape, dtype, source, tag): def recv(shape, dtype, source, tag):
"""
blocking receive
"""
return MPIRecvWait(tag)(*irecv(shape, dtype, source, tag)) return MPIRecvWait(tag)(*irecv(shape, dtype, source, tag))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论