oneflow
oneflow copied to clipboard
core dumped occurs when an empty array is processed with oneflow.dot
Summary
core dumped occurs when an empty array is processed with oneflow.dot
Code to reproduce bug
import oneflow as flow
import numpy as np
x1 = flow.tensor(np.array([], dtype=np.float32))
x1 = x1.cuda()
x2 = flow.tensor(np.array([], dtype=np.float32))
x2 = x2.cuda()
y1 = flow.dot(x1,x2)
print(y1)
x1 = flow.tensor(np.array([], dtype=np.float32))
x1=x1.cpu()
x2 = flow.tensor(np.array([], dtype=np.float32))
x2 = x2.cpu()
y2 = flow.dot(x1,x2)
print(y2)
System Information
- What is your OneFlow installation :dockerhub
- OS:Linux
- OneFlow version (run python3 -m oneflow --doctor):0.9.1.dev20231024+cu117
- Python version: 3.8