We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b1918f commit 170ac72Copy full SHA for 170ac72
paddle/fluid/operators/load_op.cc
@@ -46,19 +46,6 @@ class LoadOp : public framework::OperatorBase {
46
auto *tensor = out_var->GetMutable<framework::LoDTensor>();
47
48
DeserializeFromStream(fin, tensor, *dev_ctx);
49
-
50
- if (platform::is_gpu_place(place)) {
51
- // copy CPU to GPU
52
- framework::LoDTensor cpu_tensor;
53
- cpu_tensor.ShareDataWith(*tensor);
54
- cpu_tensor.set_lod(tensor->lod());
55
56
- // reset tensor
57
- out_var->Clear();
58
- tensor = out_var->GetMutable<framework::LoDTensor>();
59
- tensor->set_lod(cpu_tensor.lod());
60
- TensorCopy(cpu_tensor, place, *dev_ctx, tensor);
61
- }
62
}
63
};
64
0 commit comments