未验证 提交 5e23a5ec 编写于 作者: Y yuyang18

Rename TransferData -> TransformData

上级 59992013
......@@ -74,7 +74,7 @@ void OperatorWithKernel::Run(
auto kernel_type_for_var = this->GetKernelTypeForVar(...);
if (kernel_type_for_var.place_ != expected_kernel_key.place_) {
auto* trans_var = new_scope.Var(var_name);
auto* out = TransferData(expected_kernel_key,
auto* out = TransformData(expected_kernel_key,
kernel_type_for_var,
*tensor_in);
SetTensorToVariable(...);
......
......@@ -26,9 +26,9 @@ static void PassTensorData(Tensor *from, Tensor *to) {
*from = Tensor();
}
void TransferData(const OpKernelType &expected_kernel_type,
const OpKernelType &kernel_type_for_var,
const Tensor &input_tensor, Tensor *output_tensor) {
void TransformData(const OpKernelType &expected_kernel_type,
const OpKernelType &kernel_type_for_var,
const Tensor &input_tensor, Tensor *output_tensor) {
bool transformed = false;
Tensor in;
in.ShareDataWith(input_tensor);
......
......@@ -30,9 +30,9 @@ limitations under the License. */
namespace paddle {
namespace framework {
void TransferData(const OpKernelType &expected_kernel_type,
const OpKernelType &kernel_type_for_var,
const Tensor &input_tensor, Tensor *out);
void TransformData(const OpKernelType &expected_kernel_type,
const OpKernelType &kernel_type_for_var,
const Tensor &input_tensor, Tensor *out);
/**
* Set OutVar from InVar, except the tensor is shared with `tensor`
......
......@@ -725,7 +725,7 @@ Scope* OperatorWithKernel::TryTransferData(
auto* trans_var = new_scope->Var(var_name);
Tensor out;
TransferData(expected_kernel_key, kernel_type_for_var, *tensor_in, &out);
TransformData(expected_kernel_key, kernel_type_for_var, *tensor_in, &out);
SetTensorToVariable(*var, out, trans_var);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册