paddle.einsum is broken in dev version, and breaks tests in einops

qmb5sa22  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(48)

bug描述 Describe the Bug

Example to reproduce the problem:

import paddle
import numpy as np

x = np.zeros([2, 3], dtype=np.float32)
tensor = paddle.to_tensor(x)
tensor.stop_gradient = False

paddle.einsum('..., ... , ... -> ...', tensor, tensor, tensor)

result:

ValueError: Einstein sum subscript 'bn' does not contain the correct number of indices for operand 0.

Previous versions correctly handled this operation.

Example of job failure in einops tests: https://github.com/arogozhnikov/einops/actions/runs/8745826953/job/24001566418?pr=316

其他补充信息 Additional Supplementary Information

Currently I test with dev version (that's currently latest main):

pip install numpy paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html
paddle.version.show()
commit: 12692a4a715f4a7aa6c00f38ebdc0e86d88d5a42
cuda: False
cudnn: False
nccl: 0
xpu: False
xpu_xccl: False
xpu_xhpc: False
cinn: False

as I mentioned, previously paddle worked correctly.

q8l4jmvw

q8l4jmvw1#

Thank you for your feedback!, we will push for fixing the bug after successful reproduction.

相关问题