Poplar and PopLibs
TileAllocation.hpp
Go to the documentation of this file.
1// Copyright (c) 2019 Graphcore Ltd. All rights reserved.
2#ifndef INCLUDE_GCL_TILEALLOCATION_HPP
3#define INCLUDE_GCL_TILEALLOCATION_HPP
4
5#include <poplar/Graph.hpp>
6#include <vector>
7
10#if __cplusplus >= 201603L
14#define GCL_NO_DISCARD [[nodiscard]]
15#else
19#define GCL_NO_DISCARD
20#endif
21
23namespace gcl {
24
37
59GCL_NO_DISCARD std::vector<unsigned>
60perIPUTiles(const poplar::Graph &graph, unsigned offset, unsigned count,
61 bool sorted = true, bool tilePairs = true);
62
63} // namespace gcl
64#endif // INCLUDE_GCL_TILEALLOCATION_HPP
#define GCL_NO_DISCARD
Produce compile time warning for unused return values.
Definition: TileAllocation.hpp:19
This class represents a graph program to be executed on the IPU.
Definition: Graph.hpp:52
Graphcore Communications Library.
unsigned getMinIoTiles(const poplar::Graph &graph)
Get the minimum number of IO tiles required for GCL operations.
std::vector< unsigned > perIPUTiles(const poplar::Graph &graph, unsigned offset, unsigned count, bool sorted=true, bool tilePairs=true)
Return a list of tile IDs optimal for GCL collective operations.