oneflow icon indicating copy to clipboard operation
oneflow copied to clipboard

When nan/inf is a parameter of 'oneflow.arange', there is a core dumped happen, it should add a data type check here

Open Redempt1onzzZZ opened this issue 1 year ago • 1 comments

Summary

When nan/inf is a parameter of 'oneflow.arange', there is a core dumped happen. 'numpy.arange' will throw an error.

Code to reproduce bug

import oneflow as flow
import numpy as np

start=0.1
end=float('inf')
step=2

# oneflow
oneflow_range = flow.arange(start, end, step)
print("OneFlow:", oneflow_range)

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 Mar 28 '24 08:03 Redempt1onzzZZ

when inf is step, there is no core dumped

Redempt1onzzZZ avatar Mar 28 '24 08:03 Redempt1onzzZZ