8#ifndef poplin_TriangularSolve_hpp
9#define poplin_TriangularSolve_hpp
10#include <poplar/Graph.hpp>
11#include <poplar/Program.hpp>
47 const poplar::Type &outputType,
const std::vector<std::size_t> &aShape,
48 const std::vector<std::size_t> &bShape,
bool leftSide,
83 const poplar::Type &outputType,
const std::vector<std::size_t> &aShape,
84 const std::vector<std::size_t> &bShape,
bool leftSide,
104 bool lower,
bool unitDiagonal,
144 bool lower,
bool unitDiagonal,
148 PlanningCache *cache =
nullptr);
161std::vector<std::pair<MatMulParams, poplar::OptionFlags>>
164 const std::vector<std::size_t> &aShape,
165 const std::vector<std::size_t> &bShape,
bool leftSide,
bool lower,
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
Linear algebra functions.
Definition: Cholesky.hpp:14
poplar::Tensor createTriangularSolveInputRHS(poplar::Graph &graph, const poplar::Type &inputType, const poplar::Type &outputType, const std::vector< std::size_t > &aShape, const std::vector< std::size_t > &bShape, bool leftSide, const poplar::DebugContext &debugContext, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Create a tensor that is used as the right operand of triangular solve.
poplar::Tensor createTriangularSolveInputLHS(poplar::Graph &graph, const poplar::Type &inputType, const poplar::Type &outputType, const std::vector< std::size_t > &aShape, const std::vector< std::size_t > &bShape, bool leftSide, const poplar::DebugContext &debugContext, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Create a tensor that is used as the left operand of triangular solve.
poplar::Tensor triangularMask(poplar::Graph &graph, const poplar::Tensor &a, bool lower, bool unitDiagonal, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={})
Masks the unused components of the input tensor with zeroes, optionally allowing for a unit diagonal.
std::vector< std::pair< MatMulParams, poplar::OptionFlags > > getTriangularSolveMatMulPrePlanParameters(const poplar::Type &inputType, const poplar::Type &outputType, const std::vector< std::size_t > &aShape, const std::vector< std::size_t > &bShape, bool leftSide, bool lower, const poplar::OptionFlags &options)
Plan matrix multiplication for given triangular solver.
poplar::Tensor triangularSolve(poplar::Graph &graph, const poplar::Tensor &a, const poplar::Tensor &b, bool leftSide, bool lower, bool unitDiagonal, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Solves systems of linear equations with lower or upper triangular coefficients.
Functions and data types for performing matrix multiplies on the IPU.