File tree 4 files changed +4
-109
lines changed
4 files changed +4
-109
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ class Variable {
49
49
if (!holder_) {
50
50
holder_.reset (new PlaceholderImpl<T>());
51
51
} else {
52
- // If holder_ is RawTensor, return it . Used for load_combine.
52
+ // If holder_ is RawTensor, call GetMutable again . Used for load_combine.
53
53
if (holder_->Type () == VarTypeTrait<RawTensor>::kId &&
54
54
holder_->Type () != VarTypeTrait<T>::kId ) {
55
- return static_cast <T *>(holder_->Ptr ());
55
+ return static_cast <RawTensor *>(holder_->Ptr ())-> GetMutable <T>( );
56
56
}
57
57
PADDLE_ENFORCE_EQ (
58
58
holder_->Type (),
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ limitations under the License. */
19
19
#include " paddle/phi/backends/gpu/gpu_context.h"
20
20
#include " paddle/phi/backends/xpu/xpu_context.h"
21
21
#include " paddle/phi/core/distributed/auto_parallel/dist_tensor.h"
22
- #include " paddle/phi/core/framework/ raw_tensor.h"
22
+ #include " paddle/phi/core/raw_tensor.h"
23
23
#include " paddle/phi/core/selected_rows.h"
24
24
#include " paddle/phi/core/sparse_coo_tensor.h"
25
25
#include " paddle/phi/core/sparse_csr_tensor.h"
Original file line number Diff line number Diff line change 22
22
#include " paddle/phi/core/framework/convert_utils.h"
23
23
#include " paddle/phi/core/framework/data_type_transform.h"
24
24
#include " paddle/phi/core/framework/lod_tensor_serialize.h"
25
- #include " paddle/phi/core/framework/raw_tensor.h"
26
25
#include " paddle/phi/core/framework/var_type_helper.h"
27
26
#include " paddle/phi/core/kernel_registry.h"
28
27
#include " paddle/phi/core/platform/device_context.h"
28
+ #include " paddle/phi/core/raw_tensor.h"
29
29
#include " paddle/phi/core/tensor_utils.h"
30
30
#include " paddle/phi/core/vocab/string_array.h"
31
31
You can’t perform that action at this time.
0 commit comments