LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
El Namespace Reference

Namespaces

 details
 

Functions

template<typename F >
void ColumnSum (const Matrix< F > &X, Matrix< F > &sums)
 
template<typename F >
void ColumnSum (const AbstractMatrix< F > &X, AbstractMatrix< F > &sums)
 
template<typename F >
void ColumnSum (const AbstractDistMatrix< F > &A, AbstractDistMatrix< F > &sums)
 
template<typename F >
void RowSum (const Matrix< F > &X, Matrix< F > &sums)
 
template<typename F >
void RowSum (const AbstractMatrix< F > &X, AbstractMatrix< F > &sums)
 
template<typename F >
void RowSum (const AbstractDistMatrix< F > &A, AbstractDistMatrix< F > &sums)
 
template<typename F >
void ColumnSummaryStats (const Matrix< F > &X, F &sum, F &min, F &max, F &mean)
 
template<typename ArchiveT , typename T >
void save (ArchiveT &ar, ::El::AbstractMatrix< T > const &mat)
 Save a matrix to a text-based archive. More...
 
template<typename ArchiveT , typename T , ::El::Device D, lbann::utils::WhenTextArchive< ArchiveT > = 1>
void save (ArchiveT &ar, ::El::Matrix< T, D > const &mat)
 Save a matrix to a binary archive. More...
 
template<typename ArchiveT , typename T , ::El::Device D>
void save (lbann::RootedOutputArchiveAdaptor< ArchiveT > &ar, ::El::Matrix< T, D > const &mat)
 
template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void load (ArchiveT &archive, ::El::AbstractMatrix< T > &mat)
 
template<typename ArchiveT , typename T , ::El::Device D, lbann::utils::WhenTextArchive< ArchiveT > = 1>
void load (ArchiveT &archive, ::El::Matrix< T, D > &mat)
 "Load" a CPU Matrix from a text-based archive. More...
 
template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void load (ArchiveT &archive, ::El::Matrix< T, ::El::Device::CPU > &mat)
 Load a CPU Matrix from a non-text archive. More...
 
template<typename ArchiveT , typename T , ::El::Device D>
void load (lbann::RootedInputArchiveAdaptor< ArchiveT > &ar, ::El::Matrix< T, D > &mat)
 
template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void save (ArchiveT &ar, ::El::AbstractDistMatrix< T > const &mat)
 Save a distributed matrix to a text-based archive. More...
 
template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void load (ArchiveT &ar, ::El::AbstractDistMatrix< T > &mat)
 Load a DistMatrix from a text-based archive. More...
 
template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void save (lbann::RootedOutputArchiveAdaptor< ArchiveT > &ar, ::El::AbstractDistMatrix< T > const &mat)
 
template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void load (lbann::RootedInputArchiveAdaptor< ArchiveT > &ar, ::El::AbstractDistMatrix< T > &mat)
 
template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void save (lbann::RootedOutputArchiveAdaptor< ArchiveT > &ar, ::El::DistMatrix< T, ::El::CIRC, ::El::CIRC > const &mat)
 
template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void load (lbann::RootedInputArchiveAdaptor< ArchiveT > &ar, ::El::DistMatrix< T, ::El::CIRC, ::El::CIRC > &mat)
 
template<typename T >
bool compare_values (Matrix< T, Device::CPU > const &A, Matrix< T, Device::CPU > const &B)
 
template<typename S , typename T >
bool operator== (AbstractMatrix< S > const &A, AbstractMatrix< T > const &B) noexcept
 
template<typename T >
bool operator== (AbstractMatrix< T > const &A, AbstractMatrix< T > const &B)
 
template<typename S , typename T >
bool operator== (AbstractDistMatrix< S > const &A, AbstractDistMatrix< T > const &B) noexcept
 
template<typename T >
bool operator== (AbstractDistMatrix< T > const &A, AbstractDistMatrix< T > const &B) noexcept
 

Function Documentation

◆ ColumnSum() [1/3]

template<typename F >
void El::ColumnSum ( const Matrix< F > &  X,
Matrix< F > &  sums 
)

◆ ColumnSum() [2/3]

template<typename F >
void El::ColumnSum ( const AbstractMatrix< F > &  X,
AbstractMatrix< F > &  sums 
)

◆ ColumnSum() [3/3]

template<typename F >
void El::ColumnSum ( const AbstractDistMatrix< F > &  A,
AbstractDistMatrix< F > &  sums 
)

◆ ColumnSummaryStats()

template<typename F >
void El::ColumnSummaryStats ( const Matrix< F > &  X,
F &  sum,
F &  min,
F &  max,
F &  mean 
)

◆ compare_values()

template<typename T >
bool El::compare_values ( Matrix< T, Device::CPU > const &  A,
Matrix< T, Device::CPU > const &  B 
)

Definition at line 34 of file MatrixHelpers.hpp.

Here is the caller graph for this function:

◆ load() [1/7]

template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void El::load ( ArchiveT &  archive,
::El::AbstractMatrix< T > &  mat 
)

Definition at line 120 of file serialize_matrices_impl.hpp.

Here is the caller graph for this function:

◆ load() [2/7]

template<typename ArchiveT , typename T , ::El::Device D, lbann::utils::WhenTextArchive< ArchiveT > = 1>
void El::load ( ArchiveT &  archive,
::El::Matrix< T, D > &  mat 
)

"Load" a CPU Matrix from a text-based archive.

The "text-based" ("human-readable") archives (XML and JSON) will only contain basic matrix metadata (height and width). Thus, a true deserialization will not be possible. Instead, the matrix restored by one of these archive types will have the proper size but it will not have meaningful data. Since these archive types are primarily intended for debugging, this should not be a problem. If it is, open an issue and it will be remedied.

Template Parameters
ArchiveT(Inferred) The Cereal archive type to use.
T(Inferred) The data type of the matrix.
Parameters
archiveThe Cereal archive from which the matrix will be read.
matThe target matrix to deserialize.
Exceptions
lbann::exceptionThe input matrix is already setup as a view.
Todo:
Perhaps it's better to throw an exception for these archives?

Definition at line 140 of file serialize_matrices_impl.hpp.

◆ load() [3/7]

template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void El::load ( ArchiveT &  archive,
::El::Matrix< T, ::El::Device::CPU > &  mat 
)

Load a CPU Matrix from a non-text archive.

Template Parameters
ArchiveT(Inferred) The Cereal archive type to use.
T(Inferred) The data type of the matrix.
Parameters
archiveThe Cereal archive from which the matrix will be read.
matThe target matrix to deserialize.
Exceptions
lbann::exceptionThe input matrix is already setup as a view.

Definition at line 151 of file serialize_matrices_impl.hpp.

Here is the call graph for this function:

◆ load() [4/7]

template<typename ArchiveT , typename T , ::El::Device D>
void El::load ( lbann::RootedInputArchiveAdaptor< ArchiveT > &  ar,
::El::Matrix< T, D > &  mat 
)

Definition at line 175 of file serialize_matrices_impl.hpp.

Here is the call graph for this function:

◆ load() [5/7]

template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void El::load ( ArchiveT &  ar,
::El::AbstractDistMatrix< T > &  mat 
)

Load a DistMatrix from a text-based archive.

Load a DistMatrix from a non-text archive.

Template Parameters
ArchiveT(Inferred) The Cereal archive type to use.
T(Inferred) The data type of the matrix.
Parameters
arThe Cereal archive from which the matrix will be read.
matThe target matrix to deserialize into.
Exceptions
lbann::exceptionThe input matrix is already setup as a view.

Definition at line 220 of file serialize_matrices_impl.hpp.

Here is the call graph for this function:

◆ load() [6/7]

template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void El::load ( lbann::RootedInputArchiveAdaptor< ArchiveT > &  ar,
::El::AbstractDistMatrix< T > &  mat 
)

Definition at line 273 of file serialize_matrices_impl.hpp.

Here is the call graph for this function:

◆ load() [7/7]

template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void El::load ( lbann::RootedInputArchiveAdaptor< ArchiveT > &  ar,
::El::DistMatrix< T, ::El::CIRC, ::El::CIRC > &  mat 
)

Definition at line 344 of file serialize_matrices_impl.hpp.

Here is the call graph for this function:

◆ operator==() [1/4]

template<typename S , typename T >
bool El::operator== ( AbstractMatrix< S > const &  A,
AbstractMatrix< T > const &  B 
)
noexcept

Definition at line 71 of file MatrixHelpers.hpp.

◆ operator==() [2/4]

template<typename T >
bool El::operator== ( AbstractMatrix< T > const &  A,
AbstractMatrix< T > const &  B 
)

Definition at line 77 of file MatrixHelpers.hpp.

Here is the call graph for this function:

◆ operator==() [3/4]

template<typename S , typename T >
bool El::operator== ( AbstractDistMatrix< S > const &  A,
AbstractDistMatrix< T > const &  B 
)
noexcept

Definition at line 98 of file MatrixHelpers.hpp.

◆ operator==() [4/4]

template<typename T >
bool El::operator== ( AbstractDistMatrix< T > const &  A,
AbstractDistMatrix< T > const &  B 
)
noexcept

Definition at line 105 of file MatrixHelpers.hpp.

◆ RowSum() [1/3]

template<typename F >
void El::RowSum ( const Matrix< F > &  X,
Matrix< F > &  sums 
)

◆ RowSum() [2/3]

template<typename F >
void El::RowSum ( const AbstractMatrix< F > &  X,
AbstractMatrix< F > &  sums 
)

◆ RowSum() [3/3]

template<typename F >
void El::RowSum ( const AbstractDistMatrix< F > &  A,
AbstractDistMatrix< F > &  sums 
)

◆ save() [1/6]

template<typename ArchiveT , typename T >
void El::save ( ArchiveT &  ar,
::El::AbstractMatrix< T > const &  mat 
)

Save a matrix to a text-based archive.

For these text-based archives (XML and JSON), this will just output the matrix metadata. Thus, a true deserialization will not be possible. Since these archive types are primarily intended for debugging, this should not be a problem. If it is, open an issue and it will be remedied.

Warning
It is the caller's responsibility to ensure that the matrix to be serialized is actually a data-owning matrix. Serializing views is not supported, and, in the context of LBANN, should be unnecessary as the views will be reestablished when setup() is called on the deserialized objects.
Template Parameters
ArchiveT(Inferred) The Cereal archive type to use.
T(Inferred) The data type of the matrix.
Parameters
arThe Cereal archive into which the matrix will be written.
matThe matrix to serialize.
Exceptions
lbann::exceptionThrown when the matrix is actually a view.

Definition at line 39 of file serialize_matrices_impl.hpp.

Here is the caller graph for this function:

◆ save() [2/6]

template<typename ArchiveT , typename T , ::El::Device D, lbann::utils::WhenTextArchive< ArchiveT > = 1>
void El::save ( ArchiveT &  ar,
::El::Matrix< T, D > const &  mat 
)

Save a matrix to a binary archive.

Definition at line 59 of file serialize_matrices_impl.hpp.

◆ save() [3/6]

template<typename ArchiveT , typename T , ::El::Device D>
void El::save ( lbann::RootedOutputArchiveAdaptor< ArchiveT > &  ar,
::El::Matrix< T, D > const &  mat 
)

Definition at line 109 of file serialize_matrices_impl.hpp.

Here is the call graph for this function:

◆ save() [4/6]

template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void El::save ( ArchiveT &  ar,
::El::AbstractDistMatrix< T > const &  mat 
)

Save a distributed matrix to a text-based archive.

Save a distributed matrix to a non-text (binary) archive.

For these text-based archives (XML and JSON), this will just output the matrix metadata. Thus, a true deserialization will not be possible. Since these archive types are primarily intended for debugging, this should not be a problem. If it is, open an issue and it will be remedied.

Warning
It is the caller's responsibility to ensure that the matrix to be serialized is actually a data-owning matrix. Serializing views is not supported, and, in the context of LBANN, should be unnecessary as the views will be reestablished when setup() is called on the deserialized objects.
Template Parameters
ArchiveT(Inferred) The Cereal archive type to use.
T(Inferred) The data type of the matrix.
Parameters
arThe Cereal archive into which the matrix will be written.
matThe distributed matrix to serialize.
Exceptions
lbann::exceptionThrown when the matrix is actually a view.

In this case, the binary matrix data will be saved to the archive, as well as the global height/width.

Template Parameters
ArchiveT(Inferred) The Cereal archive type to use.
T(Inferred) The data type of the matrix.
Parameters
arThe Cereal archive into which the matrix will be written.
matThe distributed matrix to serialize.
Exceptions
lbann::exceptionThrown when the matrix is actually a view.

Definition at line 210 of file serialize_matrices_impl.hpp.

◆ save() [5/6]

template<typename ArchiveT , typename T , lbann::utils::WhenTextArchive< ArchiveT > = 1>
void El::save ( lbann::RootedOutputArchiveAdaptor< ArchiveT > &  ar,
::El::AbstractDistMatrix< T > const &  mat 
)

Definition at line 263 of file serialize_matrices_impl.hpp.

◆ save() [6/6]

template<typename ArchiveT , typename T , lbann::utils::WhenNotTextArchive< ArchiveT > = 1>
void El::save ( lbann::RootedOutputArchiveAdaptor< ArchiveT > &  ar,
::El::DistMatrix< T, ::El::CIRC, ::El::CIRC > const &  mat 
)

Definition at line 330 of file serialize_matrices_impl.hpp.

Here is the call graph for this function: