Poplar and PopLibs
MatMul.hpp
Go to the documentation of this file.
1// Copyright (c) 2020 Graphcore Ltd. All rights reserved.
6#ifndef popsparse_MatMul_hpp
7#define popsparse_MatMul_hpp
8
9#include <poplar/Graph.hpp>
10
13
14namespace popsparse {
15namespace dynamic {
16
17class MatMulParams;
18
57 poplar::Graph &graph, const poplar::Type &inputType,
58 const MatMulParams &params, const poplar::DebugContext &debugContext = {},
59 const poplar::OptionFlags &options = {}, PlanningCache *cache = nullptr);
60
76 poplar::Graph &graph, const poplar::Type &inputType,
77 const MatMulParams &params, const poplar::DebugContext &debugContext = {},
78 const poplar::OptionFlags &options = {}, PlanningCache *cache = nullptr);
79
121 poplar::Graph &graph, const SparseTensor &lhs, const poplar::Tensor &rhs,
122 poplar::program::Sequence &prog, bool transposeLHS = false,
123 bool transposeRHS = false, const poplar::DebugContext &debugContext = {},
124 const poplar::OptionFlags &options = {}, PlanningCache *cache = nullptr);
125
126} // end namespace dynamic
127} // end namespace popsparse
128
129#endif // popsparse_MatMul_hpp
Caching of plans for dynamically sparse operations.
Basic representation of a sparse tensor.
DebugContext gathers the common external parameters of the context of an operation.
Definition: DebugContext.hpp:221
This class represents a graph program to be executed on the IPU.
Definition: Graph.hpp:52
A set of option/value string flags to be used in various APIs.
Definition: OptionFlags.hpp:24
A reference to a subset of tensor elements.
Definition: Tensor.hpp:38
Class representing device data types.
Definition: Type.hpp:42
Program that executes a sequence of programs.
Definition: Program.hpp:77
Representation of a sparse tensor.
Definition: SparseTensor.hpp:16
poplar::Tensor createSparseDenseMatMulRHS(poplar::Graph &graph, const poplar::Type &inputType, const MatMulParams &params, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Create a dense tensor that is used as the right-hand operand in a sparse * dense matrix multiplicatio...
SparseTensor createSparseDenseMatMulLHS(poplar::Graph &graph, const poplar::Type &inputType, const MatMulParams &params, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Create a sparse tensor that is used as the left-hand operand in a sparse * dense matrix multiplicatio...
poplar::Tensor sparseDenseMatMul(poplar::Graph &graph, const SparseTensor &lhs, const poplar::Tensor &rhs, poplar::program::Sequence &prog, bool transposeLHS=false, bool transposeRHS=false, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Perform a sparse * dense matrix multiplication, yielding a dense result.
Support for sparse matrices.
Definition: codelets.hpp:8