oneflow icon indicating copy to clipboard operation
oneflow copied to clipboard

core dumped occurs when an empty array is processed with oneflow.tensordot and the dims argument is 2

Open Redempt1onzzZZ opened this issue 1 year ago • 0 comments

Summary

core dumped occurs when an empty array is processed with oneflow.tensordot and the dims argument is 2

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.tensordot(x1,x2,dims=2)
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.tensordot(x1,x2,dims=2)
print(y2)

image

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

Redempt1onzzZZ avatar Apr 01 '24 08:04 Redempt1onzzZZ