Poplar and PopLibs
Fill.hpp
Go to the documentation of this file.
1// Copyright (c) 2020 Graphcore Ltd. All rights reserved.
10#ifndef popops_Fill_hpp
11#define popops_Fill_hpp
12
13#include <poplar/Graph.hpp>
14#include <poplar/Program.hpp>
15#include <poplar/TypeTraits.hpp>
16
17namespace popops {
18
29template <typename FillValueType>
31 const std::vector<poplar::Interval> &tileRegions, unsigned tile,
32 poplar::ComputeSet fillCS, FillValueType fillValue);
33
43template <typename FillValueType>
44void fill(poplar::Graph &graph, const poplar::Tensor &t, unsigned tile,
45 poplar::ComputeSet fillCS, FillValueType fillValue);
46
59template <typename FillValueType>
60void fill(poplar::Graph &graph, const poplar::Tensor &t,
61 const std::vector<std::vector<poplar::Interval>> &mapping,
62 poplar::ComputeSet fillCS, FillValueType fillValue);
63
76template <typename FillValueType>
77void fill(poplar::Graph &graph, const poplar::Tensor &t,
78 poplar::program::Sequence &prog, FillValueType fillValue,
79 const poplar::DebugContext &debugContext = {});
80
81} // namespace popops
82
83#endif // popops_Fill_hpp
A reference to a compute set within a graph.
Definition: GraphElements.hpp:131
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 reference to a subset of tensor elements.
Definition: Tensor.hpp:38
Program that executes a sequence of programs.
Definition: Program.hpp:77
Common functions, such as elementwise and reductions.
Definition: AllTrue.hpp:15
void fill(poplar::Graph &graph, poplar::Tensor t, const std::vector< poplar::Interval > &tileRegions, unsigned tile, poplar::ComputeSet fillCS, FillValueType fillValue)
Appends vertices to fillCS which fills elements in tileRegions of t which reside on tile tile.