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

Rename TransferData -> TransformData

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