diff --git a/paddle/fluid/framework/new_executor/standalone_executor.cc b/paddle/fluid/framework/new_executor/standalone_executor.cc index 24931a15e121e8ac8755822f89a8466f89d7bed6..1976f8433d021e8a454bb609c81e09016457d120 100644 --- a/paddle/fluid/framework/new_executor/standalone_executor.cc +++ b/paddle/fluid/framework/new_executor/standalone_executor.cc @@ -61,6 +61,7 @@ StandaloneExecutor::StandaloneExecutor(const platform::Place& place, execution_config.create_local_scope = false; execution_config.skip_gc_vars = job->SkipGcVars(); + // TODO(phlrain) we only support cpu for now if (FLAGS_enable_new_ir_in_executor && platform::is_cpu_place(place)) { VLOG(6) << "begin to translate" << std::endl; auto base_program = paddle::TranslateLegacyProgramToProgram(*program); diff --git a/paddle/fluid/ir/phi_kernel_adaptor/phi_kernel_util.h b/paddle/fluid/ir/phi_kernel_adaptor/phi_kernel_util.h index 98fff8ede3e9d0e4f5eaf33314f771d0afc370e3..8a8efae74736127a632ea658947e727a88dc8ea7 100644 --- a/paddle/fluid/ir/phi_kernel_adaptor/phi_kernel_util.h +++ b/paddle/fluid/ir/phi_kernel_adaptor/phi_kernel_util.h @@ -187,9 +187,7 @@ void BuildPhiContext( } ctx->EmplaceBackAttr(vec_res); } else if (attr_type_name == "ir::ArrayAttribute") { - std::cerr << "int64 array" << std::endl; auto array_list = attr_map[t].dyn_cast().data(); - std::cerr << "len " << array_list.size() << std::endl; std::vector vec_res; if (array_list.size() > 0) { @@ -198,12 +196,8 @@ void BuildPhiContext( true, phi::errors::PreconditionNotMet( "Element in array list MUST be ir::Int64Attribute ")); - std::cerr << "int 64" << std::endl; for (size_t i = 0; i < array_list.size(); ++i) { - std::cerr << "i " << i << "\t" - << array_list[i].dyn_cast().data() - << std::endl; vec_res.push_back( array_list[i].dyn_cast().data()); } diff --git a/paddle/fluid/ir/transforms/pd_op_to_kernel_pass.cc b/paddle/fluid/ir/transforms/pd_op_to_kernel_pass.cc index ef3d499389e9970501057163f95368711bbd5f66..e5471e0d873ddff88b98b958718e6651ab731bbc 100644 --- a/paddle/fluid/ir/transforms/pd_op_to_kernel_pass.cc +++ b/paddle/fluid/ir/transforms/pd_op_to_kernel_pass.cc @@ -132,6 +132,7 @@ phi::KernelKey GetKernelKey( } auto input_tmp = op->operand(i); + // NOTE: if not input_tmp, it's an optional input if (!input_tmp) { continue; }