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: 【Lv3】【Bug Fix】- Incompatibility of backward operators when using torch.compile #249

Open
Bowen12992 opened this issue Oct 28, 2024 · 4 comments
Assignees

Comments

@Bowen12992
Copy link
Collaborator

Bowen12992 commented Oct 28, 2024

import flag_gems
import torch
flag_gems.enable()
def f(x,y):
    a =  torch.tanh(y)
    b = x - y
    return flag_gems.fused.gelu_and_mul(a,b)
x = torch.randn(10,device="cuda")
y = torch.randn(10,device="cuda")
F=torch.compile(f)
print(F(x,y))

tanh 在 使用 triton3.0 torch2.4 的时候会有报错:
注:不同的 triton3.0 torch2.4 版本会有不同的报错,可以定位解决最新版本的即可

@Bowen12992 Bowen12992 converted this from a draft issue Oct 28, 2024
@Bowen12992 Bowen12992 changed the title 代码贡献:任务2【困难】 代码贡献:任务12【困难】类型【Bug修复】- 使用 torch.compile 时反向算子不兼容 Oct 28, 2024
@Bowen12992 Bowen12992 changed the title 代码贡献:任务12【困难】类型【Bug修复】- 使用 torch.compile 时反向算子不兼容 代码贡献:任务2【困难】类型【Bug修复】- 使用 torch.compile 时反向算子不兼容 Oct 28, 2024
@Bowen12992 Bowen12992 changed the title 代码贡献:任务2【困难】类型【Bug修复】- 使用 torch.compile 时反向算子不兼容 代码贡献:【困难】【Bug修复】- 使用 torch.compile 时反向算子不兼容 Oct 28, 2024
@Tango2018cc
Copy link

认领方式:

  1. Issue中留言评论:「认领人名称+认领」
  2. 在贡献者微信群内发送:认领的Issue号例如:「认领+[https://github.com/FlagOpen/FlagGems/issues/xxx」]

@yinfan98
Copy link

尹帆 认领

@Tango2018cc Tango2018cc changed the title 代码贡献:【困难】【Bug修复】- 使用 torch.compile 时反向算子不兼容 Code Contribution: 【Difficult】【Bug Fix】- Incompatibility of backward operators when using torch.compile Oct 29, 2024
@Tango2018cc Tango2018cc changed the title Code Contribution: 【Difficult】【Bug Fix】- Incompatibility of backward operators when using torch.compile Code Contribution: 【Lv3】【Bug Fix】- Incompatibility of backward operators when using torch.compile Oct 29, 2024
@Tango2018cc
Copy link

领取后,请于11.15日前完成,谢谢

@yinfan98
Copy link

PR: #263

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

No branches or pull requests

3 participants