Poplar and PopLibs
HostSliceTensor.hpp
Go to the documentation of this file.
1// Copyright (c) 2020 Graphcore Ltd. All rights reserved.
8#ifndef popops_HostSliceTensor_hpp_
9#define popops_HostSliceTensor_hpp_
10
11#include <poplar/Tensor.hpp>
12
13namespace poplar {
14
15class Graph;
16
17}
18
19namespace popops {
20
23 poplar::Tensor indices;
24 poplar::Tensor tensor;
25};
26
43 const std::vector<size_t> &shape, const bool isRead,
44 const poplar::DebugContext &debugContext = {});
45
58 const std::vector<size_t> &shape, bool isRead,
59 const poplar::DebugContext &debugContext = {});
60
61} // namespace popops
62#endif
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
Class representing device data types.
Definition: Type.hpp:42
Poplar classes and functions.
Definition: ArrayRef.hpp:14
Common functions, such as elementwise and reductions.
Definition: AllTrue.hpp:15
IndicesAndTensor createHostSliceableTensor(poplar::Graph &graph, const poplar::Type &type, const std::vector< size_t > &shape, const bool isRead, const poplar::DebugContext &debugContext={})
Create a Tensor that is well laid out for a host exchange copy and at the same time create the index ...
poplar::Tensor createHostTransferableTensor(poplar::Graph &graph, const poplar::Type &type, const std::vector< size_t > &shape, bool isRead, const poplar::DebugContext &debugContext={})
Create a tensor that is well laid out for a host exchange copy.
The pair of values returned by createHostSliceableTensor().
Definition: HostSliceTensor.hpp:22