Poplar and PopLibs
ROIAlign.hpp
1// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
2
3#ifndef popnn_ROIAlign_hpp
4#define popnn_ROIAlign_hpp
5#include <poplar/Program.hpp>
6
7namespace popnn::experimental {
8
25 long unsigned int samplingRatio_, alignedHeight_, alignedWidth_;
26 bool aligned_;
27 float spatialScale_;
28 roiAlignParams(long unsigned int samplingRatio, long unsigned int poolH,
29 long unsigned int poolW, bool aligned, float spatialScale)
30 : samplingRatio_{samplingRatio}, alignedHeight_{poolH},
31 alignedWidth_{poolW}, aligned_{aligned}, spatialScale_{spatialScale} {}
32};
33
64roiAlignFwd(poplar::Graph &graph, poplar::program::Sequence &prog,
65 poplar::Tensor &bottomData, poplar::Tensor &bottomRois,
66 poplar::Tensor &bottomBatchIndex, const roiAlignParams &params,
67 const poplar::DebugContext &debugContext = {});
68
100roiAlignInputGradient(poplar::Graph &graph, poplar::program::Sequence &prog,
101 poplar::Tensor &bottomData, poplar::Tensor &bottomRois,
102 poplar::Tensor &bottomBatchIndex,
103 poplar::Tensor &topDataGrad, const roiAlignParams &params,
104 const poplar::DebugContext &debugContext = {});
105
106} // namespace popnn::experimental
107
108#endif // popnn_ROIAlign_hpp
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
parameters of ROIAlign
Definition: ROIAlign.hpp:24