GraphFunction
#include <poputil/GraphFunction.hpp>
Definitions for reusing graph structures.
Since the graph structure takes up memory it is sometimes useful to re-apply the same graph structure for multiple different data items. The functions in this namespace provide a way to do this by treating graphs as reusable functions.
-
namespace poputil
General utility functions for building graphs.
-
namespace graphfn
Support for using poplar::Program objects like function calls.
Enums
Functions
-
struct ArgSig
-
class ProgramFunction
Public Functions
-
ProgramFunction(poplar::Graph &graph, Signature sig, std::function<poplar::program::Program(std::vector<poplar::Tensor>&)> f, bool inlined = false, const poplar::DebugContext &debugContext = {})
Private Members
-
VoidFunction voidFunc
-
ProgramFunction(poplar::Graph &graph, Signature sig, std::function<poplar::program::Program(std::vector<poplar::Tensor>&)> f, bool inlined = false, const poplar::DebugContext &debugContext = {})
-
class TensorFunction
Public Functions
-
TensorFunction(poplar::Graph &graph, Signature sig, std::function<poplar::Tensor(std::vector<poplar::Tensor>&, poplar::program::Sequence&)> f, bool inlined = false, const poplar::DebugContext &debugContext = {})
Private Members
-
VoidFunction voidFunc
-
TensorFunction(poplar::Graph &graph, Signature sig, std::function<poplar::Tensor(std::vector<poplar::Tensor>&, poplar::program::Sequence&)> f, bool inlined = false, const poplar::DebugContext &debugContext = {})
-
class VoidFunction
Public Functions
-
VoidFunction(VoidFunction &&fn)
-
VoidFunction(poplar::Graph &graph, Signature sig, std::function<void(std::vector<poplar::Tensor>&, poplar::program::Sequence&)> f, bool inlined = false, const poplar::DebugContext &debugContext = {})
-
VoidFunction(VoidFunction &&fn)
-
struct ArgSig
-
namespace graphfn