未验证 提交 b4a149a5 编写于 作者: H hong 提交者: GitHub

posh code (#55114)

上级 58ce85f7
......@@ -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);
......
......@@ -187,9 +187,7 @@ void BuildPhiContext(
}
ctx->EmplaceBackAttr(vec_res);
} else if (attr_type_name == "ir::ArrayAttribute<ir::Int64Attribute>") {
std::cerr << "int64 array" << std::endl;
auto array_list = attr_map[t].dyn_cast<ir::ArrayAttribute>().data();
std::cerr << "len " << array_list.size() << std::endl;
std::vector<int64_t> 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<ir::Int64Attribute>().data()
<< std::endl;
vec_res.push_back(
array_list[i].dyn_cast<ir::Int64Attribute>().data());
}
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册