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

Function TransferLayout

paddle/phi/kernels/transfer_layout_kernel.h:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template <typename Context>
31DenseTensor TransferLayout(const Context& dev_ctx,
32 const DenseTensor& x,
33 DataLayout dst_layout) {
34 DenseTensor dense_out = Empty(dev_ctx, {x.dtype(), x.dims(), dst_layout});
35 TransferLayoutKernel<Context>(dev_ctx,
36 x,
37 static_cast<int>(x.layout()),
38 static_cast<int>(dst_layout),
39 &dense_out);
40 return dense_out;
41}
42
43} // namespace phi

Callers 1

TransDataLayoutFunction · 0.50

Calls 4

EmptyFunction · 0.70
dtypeMethod · 0.45
dimsMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected