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

Method ShareBufferWith

paddle/phi/core/dense_tensor_impl.cc:195–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195void DenseTensor::ShareBufferWith(const DenseTensor& tensor, bool only_buffer) {
196 holder_ = tensor.holder_;
197 if (!only_buffer) {
198 meta_.offset = tensor.meta().offset;
199 meta_.dtype = tensor.dtype();
200 }
201}
202
203#define LEGACY_DATA_MEMBER_FUNC_INSTANTIATION(dtype) \
204 template PADDLE_API dtype* DenseTensor::mutable_data( \

Callers 15

ShareBufferKernelFunction · 0.80
DistGradKernelFunction · 0.80
SliceTensorFunction · 0.80
EinsumGradKernelFunction · 0.80
PerformContractionFunction · 0.80
TransformDataFunction · 0.80
TrainFilesMethod · 0.80
RunMethod · 0.80
RunOperatorMethod · 0.80
ShareVarBufferFunction · 0.80

Calls 2

metaMethod · 0.80
dtypeMethod · 0.45

Tested by

no test coverage detected