未验证 提交 64ed92bd 编写于 作者: C Chen Weihang 提交者: GitHub

[Phi] Polish default signature attr and output select impl (#39810)

* polish default sig impl

* revert dispenable out
上级 6241913b
......@@ -137,7 +137,7 @@ KernelArgsNameMakerByOpProto::GetInputArgsNames() {
continue;
}
// If contains dispensable input, we should override the
// GetExpectedPtenKernelArgs method self
// OpArgumentMapping method self in phi/ops/compat dir
if (in.has_dispensable() && in.dispensable()) {
VLOG(6) << "Parse PtenKernel input: skip dispensable input - " << in_name;
continue;
......@@ -153,7 +153,11 @@ KernelArgsNameMakerByOpProto::GetOutputArgsNames() {
for (int i = 0; i < op_proto_->outputs_size(); ++i) {
auto& out = op_proto_->outputs()[i];
auto& out_name = out.name();
// TODO(chenweihang): outputs also need skip some cases
if ((out.has_extra() && out.extra()) || (out.has_quant() && out.quant())) {
VLOG(6) << "Parse PtenKernel output: skip extra & quant output - "
<< out_name;
continue;
}
VLOG(6) << "Parse PtenKernel output: " << out_name;
output_names_.emplace_back(out_name);
}
......@@ -165,9 +169,10 @@ KernelArgsNameMakerByOpProto::GetAttrsArgsNames() {
for (int i = 0; i < op_proto_->attrs_size(); ++i) {
auto& attr = op_proto_->attrs()[i];
auto& attr_name = attr.name();
if (attr_name == "use_mkldnn" || attr_name == "op_role" ||
attr_name == "op_role_var" || attr_name == "op_namescope" ||
attr_name == "op_callstack" || attr_name == "op_device") {
if (attr_name == "use_mkldnn" || attr_name == "use_cudnn" ||
attr_name == "op_role" || attr_name == "op_role_var" ||
attr_name == "op_namescope" || attr_name == "op_callstack" ||
attr_name == "op_device") {
VLOG(6) << "Parse PtenKernel attribute: skip needless attr - "
<< attr_name;
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册