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

Function FastTransposeCopyValid

paddle/phi/kernels/cpu/contiguous_kernel.cc:118–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118inline bool FastTransposeCopyValid(const DenseTensor& self,
119 const DenseTensor& src) {
120 constexpr int64_t MIN_NUMEL = 360;
121 return src.numel() != 0 && src.dims().size() == 2 && src.strides()[0] == 1 &&
122 src.strides()[1] == src.dims()[0] &&
123 self.dims().size() == src.dims().size() && self.numel() >= MIN_NUMEL;
124}
125
126template <typename T, typename Context>
127void ContiguousKernel(const Context& dev_ctx,

Callers 1

ContiguousKernelFunction · 0.85

Calls 4

numelMethod · 0.45
sizeMethod · 0.45
dimsMethod · 0.45
stridesMethod · 0.45

Tested by

no test coverage detected