Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[static op generation] transpose #54155

Closed
wants to merge 16 commits into from

Conversation

Liyulingyue
Copy link
Contributor

PR types

Others

PR changes

Others

Description

#53267 case1

@paddle-bot
Copy link

paddle-bot bot commented May 28, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels May 28, 2023
@paddle-bot
Copy link

paddle-bot bot commented May 28, 2023

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@@ -34,5 +34,3 @@ PD_REGISTER_BASE_KERNEL_NAME(transpose2_grad, transpose_grad);
PD_REGISTER_ARG_MAPPING_FN(transpose2, phi::TransposeOpArgumentMapping);
PD_REGISTER_ARG_MAPPING_FN(transpose2_grad,
phi::TransposeGradOpArgumentMapping);
PD_REGISTER_ARG_MAPPING_FN(transpose, phi::TransposeOpArgumentMapping);
PD_REGISTER_ARG_MAPPING_FN(transpose_grad, phi::TransposeGradOpArgumentMapping);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要修改transpose,应该修改transpose2相关的内容

auto &data_format = ctx.Attr<std::string>("data_format");
phi::DataLayout layout_ = phi::StringToDataLayout(data_format);
return phi::KernelKey(
ctx.GetPlace(), layout_, phi::TransToPhiDataType(data_type));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要修改transpose,应该修改transpose2相关的内容

- op : transpose
args : (Tensor x, int[] perm)
output : Tensor
infer_meta :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

配置到ops.yaml

- backward_op : transpose_grad
forward : transpose (Tensor x, int[] perm) -> Tensor(out)
args : (Tensor out_grad, int[] perm)
output : Tensor(x_grad)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

配置到 backward.yaml

@@ -2242,6 +2242,15 @@
func : trace
backward : trace_grad

- op : transpose (transpose2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- op : transpose (transpose2)-->- op : transpose

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Jun 14, 2023

Sorry to inform you that 11d9e9a's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@@ -2242,6 +2242,15 @@
func : trace
backward : trace_grad

- op : transpose
args : (Tensor x, int[] perm)
output : Tensor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output : Tensor(out), Tensor(xshape)
intermediate :  xshape

@@ -107,138 +107,6 @@ class TransposeOpGrad : public framework::OperatorWithKernel {
}
};

void Transpose2Op::InferShape(framework::InferShapeContext *ctx) const {
using CompatMetaTensor = framework::CompatMetaTensor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transpose2OpFusedTransposeOpMaker耦合,而且infershape也需要修改支持,建议这个任务可以先行关闭。

@Liyulingyue
Copy link
Contributor Author

#54155 (comment)

@paddle-bot
Copy link

paddle-bot bot commented Jun 16, 2023

很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。
Sorry to inform you that through our discussion, your PR fails to meet the merging standard (Reference: Paddle Custom Operator Design Doc). You can also submit an new one. Thank you.

@Liyulingyue Liyulingyue deleted the transpose branch June 29, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants