MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / CastDataLayout

Class CastDataLayout

paddle/fluid/framework/data_layout_transform.h:29–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace framework {
28
29struct CastDataLayout {
30 CastDataLayout(const phi::DeviceContext* ctx,
31 const std::vector<int>& axis,
32 const phi::DenseTensor& in,
33 phi::DenseTensor* out)
34 : in_(in), out_(out), ctx_(ctx), axis_(axis) {}
35
36 const DenseTensor in_;
37 phi::DenseTensor* out_;
38 const phi::DeviceContext* ctx_;
39 const std::vector<int> axis_;
40
41 template <typename T>
42 void apply();
43};
44
45std::vector<int> GetAxis(const DataLayout& from, const DataLayout& to);
46

Callers 1

TransDataLayoutFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected