Poplar and PopLibs
Cholesky.hpp
Go to the documentation of this file.
1// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
8#ifndef poplin_Cholesky_hpp
9#define poplin_Cholesky_hpp
10#include "poplin/MatMul.hpp"
11#include <poplar/Graph.hpp>
12#include <poplar/Program.hpp>
13
14namespace poplin {
15
16class PlanningCache;
17
35std::vector<std::pair<MatMulParams, poplar::OptionFlags>>
37 const std::vector<std::size_t> &shape,
38 bool lower, poplar::OptionFlags options);
39
67 const poplar::Type &type,
68 const std::vector<std::size_t> &shape,
69 bool lower,
70 const poplar::DebugContext &debugContext,
71 const poplar::OptionFlags &options = {},
72 PlanningCache *cache = nullptr);
73
97 bool lower, poplar::program::Sequence &prog,
98 const poplar::DebugContext &debugContext = {},
99 poplar::OptionFlags options = {},
100 PlanningCache *cache = nullptr);
101
123void choleskyInPlace(poplar::Graph &graph, const poplar::Tensor &a, bool lower,
125 const poplar::DebugContext &debugContext = {},
126 poplar::OptionFlags options = {},
127 PlanningCache *cache = nullptr);
128
129} // namespace poplin
130
131#endif // poplin_Cholesky_hpp
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 cholesky(poplar::Graph &graph, const poplar::Tensor &a, bool lower, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}, poplar::OptionFlags options={}, PlanningCache *cache=nullptr)
Computes Cholesky factor for a symmetric positive definite matrix.
void choleskyInPlace(poplar::Graph &graph, const poplar::Tensor &a, bool lower, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}, poplar::OptionFlags options={}, PlanningCache *cache=nullptr)
Computes Cholesky factor in place for a symmetric positive definite matrix.
std::vector< std::pair< MatMulParams, poplar::OptionFlags > > getCholeskyMatMulPrePlanParameters(const poplar::Type &type, const std::vector< std::size_t > &shape, bool lower, poplar::OptionFlags options)
Plan matrix multiplication for the Cholesky factoriser.
poplar::Tensor createCholeskyInput(poplar::Graph &graph, const poplar::Type &type, const std::vector< std::size_t > &shape, bool lower, const poplar::DebugContext &debugContext, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Create a tensor that is used as the input for the Cholesky factoriser.
Functions and data types for performing matrix multiplies on the IPU.