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

Code Contribution: 【Lv1】【Operator Development】diagonal_backward #314

Open
StrongSpoon opened this issue Nov 22, 2024 · 3 comments · May be fixed by #329
Open

Code Contribution: 【Lv1】【Operator Development】diagonal_backward #314

StrongSpoon opened this issue Nov 22, 2024 · 3 comments · May be fixed by #329
Assignees

Comments

@StrongSpoon
Copy link
Collaborator

StrongSpoon commented Nov 22, 2024

Description 任务介绍

Develop backward function for diagonal operator.
开发diagonal算子的反向功能。

Requirements 任务要求

Interface 接口
diagonal_backward(Tensor grad_output, SymInt[] input_sizes, int offset, int dim1, int dim2) -> Tensor
Function reference 功能参考
https://pytorch.org/docs/stable/generated/torch.diagonal.html#torch-diagonal
Implementation reference 实现参考
https://github.com/FlagOpen/FlagGems/blob/master/src/flag_gems/ops/diag.py

The operator should support all optional arguments defined in the interface.
算子应支持接口中定义的所有参数选项。

DDL 提交时间

Please submit a Pull Request within 1 week after accepting the assignment.
请于接取任务一周内提交PR。
Please provide both accuracy test and performance test code.
请同时提供实现正确性测试与性能测试代码。

@StrongSpoon StrongSpoon converted this from a draft issue Nov 22, 2024
@awayzjj
Copy link
Collaborator

awayzjj commented Nov 24, 2024

@StrongSpoon 确认下这个要实现的是 diagonal 还是 diag 的 backward?diagonal 我看前向还没有实现呢?

@StrongSpoon
Copy link
Collaborator Author

the forward function of diagonal is actually a view of input tensor, and it doesn't launch cuda kernel. this issue calls for implementation of diagonal_backward, which could be registered independently into aten library.

@awayzjj
Copy link
Collaborator

awayzjj commented Nov 26, 2024

Binary 认领

@awayzjj awayzjj linked a pull request Nov 26, 2024 that will close this issue
3 tasks
@Tango2018cc Tango2018cc moved this from Todo to In Progress in Triton China Community Nov 27, 2024
@Tango2018cc Tango2018cc moved this from In Progress to Review in Triton China Community Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review
Development

Successfully merging a pull request may close this issue.

2 participants