bug描述 Describe the Bug
bug描述 Describe the Bug
复现代码
import paddle
input_tensor = paddle.to_tensor(paddle.ones((3, 3)), dtype="float32")
index = paddle.to_tensor([0, 2], dtype="int32")
value = paddle.to_tensor([[1, 1, 1], [1, 1, 1]], dtype="float32", stop_gradient=False)
# 报错
# ValueError: (InvalidArgument) Required tensor shall not be nullptr, but received nullptr.
# [Hint: tensor should not be null.] (at /paddle/paddle/phi/core/device_context.cc:144)
outplace_res = paddle.index_add(input_tensor, index, 0, value)
outplace_res.backward()
# 正常运行
outplace_res = paddle.index_add_(input_tensor, index, 0, value)
outplace_res.backward()
其他补充信息 Additional Supplementary Information
No response
1条答案
按热度按时间h7appiyu1#
感谢,bug已收到,会在后续联系该算子负责人加紧修复