RuntimeError: The backward formula for cann_ops_nn.swiglu_group.default returned an incorrect number of gradients (expected 2 or 3, got 4). Expected one gradient for each forward input, or for each positional input to the operator. Use None for inputs that do not require a gradient
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
使用PTA 2.14.0版本的torch验证自动反向功能时,报错参数返回错误
Environment / 环境信息 (Mandatory / 必填)
ascend950
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
使用torch2.14.0版本,验证算子的自动反向功能,脚本报错。
Describe the expected behavior / 预期结果 (Mandatory / 必填)
运行正常,可以以正确进行反向运算
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
RuntimeError: The backward formula for cann_ops_nn.swiglu_group.default returned an incorrect number of gradients (expected 2 or 3, got 4). Expected one gradient for each forward input, or for each positional input to the operator. Use None for inputs that do not require a gradient
Special notes for this issue/备注 (Optional / 选填)