8#ifndef poplin_MultiConvolution_hpp
9#define poplin_MultiConvolution_hpp
13#include <poplar/Graph.hpp>
14#include <poplar/OptionFlags.hpp>
15#include <poplar/Program.hpp>
79 const std::vector<CreateTensorArgs> &args,
80 unsigned weightsIndex,
82 poplin::PlanningCache *cache =
nullptr);
95 const std::vector<CreateTensorArgs> &args,
98 poplin::PlanningCache *cache =
nullptr);
132 std::vector<ConvolutionArgs> &args,
133 const std::vector<poplar::Tensor> &weightsIn,
137 poplin::PlanningCache *cache);
153std::vector<poplar::Tensor>
158 poplin::PlanningCache *cache =
nullptr);
189std::vector<poplar::Tensor>
191 const std::vector<CalculateWeightDeltasArgs> &args,
195 poplin::PlanningCache *cache =
nullptr);
229 const std::vector<ConvWeightUpdateArgs> &args,
233 poplin::PlanningCache *cache =
nullptr);
267 poplar::Graph &graph,
const std::vector<ConvWeightUpdateArgsScalar> &args,
271 poplin::PlanningCache *cache =
nullptr);
Functions and data types to support performing convolutions.
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
Program that executes a sequence of programs.
Definition: Program.hpp:77
Linear algebra functions.
Definition: Cholesky.hpp:14
void convolutionWeightUpdate(poplar::Graph &graph, const poplar::Tensor &zDeltas, const poplar::Tensor &weights, const poplar::Tensor &activations, ConvParams params, const poplar::Tensor &scale, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Append operations to a poplar::Program to generate and apply the weight update.
poplar::Tensor calculateWeightDeltas(poplar::Graph &graph, const poplar::Tensor &zDeltas, const poplar::Tensor &activations, const ConvParams ¶ms, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Append an operation to a poplar::Program to generate the tensor of weight deltas.
poplar::Tensor convolution(poplar::Graph &graph, const poplar::Tensor &in, const poplar::Tensor &weights, const ConvParams ¶ms, bool transposeAndFlipWeights, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Convolve an input with a set of weights.
poplar::Tensor createInput(poplar::Graph &graph, const ConvParams ¶ms, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Create an input tensor for a convolution.
void weightsTransposeChansFlipXY(poplar::Graph &graph, const poplar::Tensor &weightsIn, const poplar::Tensor &weightsOut, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={})
Copy the weights in weightsIn into weightsOut such that each element of the kernel is transposed with...
poplar::Tensor createWeights(poplar::Graph &graph, const ConvParams ¶ms, const poplar::DebugContext &debugContext={}, const poplar::OptionFlags &options={}, PlanningCache *cache=nullptr)
Create a weight tensor suitable for use with convolution()
Definition: MultiConvolution.hpp:168
Definition: MultiConvolution.hpp:245
Definition: MultiConvolution.hpp:207
Definition: MultiConvolution.hpp:106
Multi-convolutions allow for a set of convolutions to be executed in parallel.
Definition: MultiConvolution.hpp:62