SparsePartitioner
#include <popsparse/SparsePartitioner.hpp>
Translation and encoding of sparsity information for a fully connected layer.
-
namespace popsparse
Support for sparse matrices.
-
namespace dynamic
Support for dynamic sparse matrices.
-
template<typename T>
class Partitioner - #include <SparsePartitioner.hpp>
Class to translate and encode sparsity information for a fully connected layer.
See createFullyConnectedWeights() for details of the options.
Public Functions
-
inline const PartitionerImpl &getImpl() const
-
Partitioner(const FullyConnectedParams ¶ms, const poplar::Type &dataType, const poplar::Target &target, const poplar::OptionFlags &options, PlanningCache *cache = {}, std::string name = "")
-
Partitioner(const MatMulParams ¶ms, const poplar::Type &dataType, const poplar::Target &target, const poplar::OptionFlags &options, PlanningCache *cache = {}, std::string name = "")
-
~Partitioner()
-
SparsityDataImpl<T> createSparsityDataImpl(const CSCMatrix<T> &matrix_) const
Create implementation sparsity representation for a compressed sparse columns (CSC) matrix.
-
SparsityDataImpl<T> createSparsityDataImpl(const CSRMatrix<T> &matrix_) const
Creates implementation sparsity representation for a compressed sparse rows (CSR) matrix.
-
SparsityDataImpl<T> createSparsityDataImpl(const COOMatrix<T> &matrix_) const
Creates implementation sparsity representation for a coordinate (COO) format matrix.
-
COOMatrix<T> sparsityDataImplToCOOMatrix(const SparsityDataImpl<T> &sparsityDataImpl) const
Create a coordinate (COO) representation matrix from implementation sparsity representation.
The COO entries are ordered by row first, and then columns.
-
CSRMatrix<T> sparsityDataImplToCSRMatrix(const SparsityDataImpl<T> &sparsityDataImpl) const
Create compressed sparse rows (CSR) representation from implementation sparsity representation.
-
CSCMatrix<T> sparsityDataImplToCSCMatrix(const SparsityDataImpl<T> &sparsityDataImpl) const
Create compressed sparse columns (CSC) representation from implementation sparsity representation.
-
inline const PartitionerImpl &getImpl() const
-
template<typename T>
struct SparsityDataImpl - #include <SparsePartitioner.hpp>
Encoding of sparsity representation.
-
template<typename T>
-
namespace static_
-
template<typename T>
class Partitioner Public Functions
-
inline const PartitionerImpl &getImpl() const
-
Partitioner(const MatMulParams ¶ms, const poplar::Type &dataType, const poplar::Target &target, const poplar::OptionFlags &options, PlanningCache *cache = {}, std::string name = "")
Construct Partitioner for a matrix multiplication.
params The matrix multiplication params. The parameters must be correctly created for the operation. i.e. sparse * dense, or dense * sparse. dataType The imput data type target A reference to the target for which the matmul is created. The target must outlive any use of the class object. options Implementation options for the matrix multiplication. cache Optional pointer to planning cache to use. Must outlive the use of the class object.
-
~Partitioner()
-
SparsityDataImpl<T> createSparsityDataImpl(const CSCMatrix<T> &matrix) const
Create implementation sparsity representation for a compressed sparse columns (CSC) matrix.
-
SparsityDataImpl<T> createSparsityDataImpl(const CSRMatrix<T> &matrix) const
Creates implementation sparsity representation for a compressed sparse rows (CSR) matrix.
-
SparsityDataImpl<T> createSparsityDataImpl(const COOMatrix<T> &matrix) const
Creates implementation sparsity representation for a coordinate (COO) format matrix.
-
COOMatrix<T> sparsityDataImplToCOOMatrix(const SparsityDataImpl<T> &sparsityDataImpl) const
Create a coordinate (COO) representation matrix from implementation sparsity representation.
The COO entries are ordered by row first, and then columns.
-
CSRMatrix<T> sparsityDataImplToCSRMatrix(const SparsityDataImpl<T> &sparsityDataImpl) const
Create compressed sparse rows (CSR) representation from implementation sparsity representation.
-
CSCMatrix<T> sparsityDataImplToCSCMatrix(const SparsityDataImpl<T> &sparsityDataImpl) const
Create compressed sparse columns (CSC) representation from implementation sparsity representation.
-
inline const PartitionerImpl &getImpl() const
-
template<typename T>
struct SparsityDataImpl - #include <SparsePartitioner.hpp>
Encoding of sparsity representation.
-
template<typename T>
-
namespace dynamic