oneflow icon indicating copy to clipboard operation
oneflow copied to clipboard

broadcast_like op throw std::bad_alloc directly when x.dim > like.dim

Open pingzhuu opened this issue 3 years ago • 0 comments

Summary

broadcast_like op throw std::bad_alloc when x.dim > like.dim

Code to reproduce bug

import oneflow as flow
a = flow.randn(1, 1)
b = flow.randn(2, 2, 2)
c = flow.broadcast_like(b, a)

output:

Traceback (most recent call last):
  File "/path/to/test.py", line 4, in <module>
    c = flow.broadcast_like(b, a)
RuntimeError: std::bad_alloc

System Information

OneFlow version: version: 0.8.1.dev20220726+cu112

pingzhuu avatar Jul 27 '22 12:07 pingzhuu