bug描述 Describe the Bug
When calling paddle.arange with end set to positive infinity on GPU, the operation never terminates and continually allocates memory until the system crashes. On CPU the same code returns an empty tensor without error.
import paddle
paddle.set_device('gpu')
start = paddle.to_tensor(0)
end = paddle.to_tensor(float('inf'))
a = paddle.arange(start,end,1, dtype=paddle.int32)
print(a)
The result on the CPU:
Tensor(shape=[0], dtype=int32, place=Place(cpu), stop_gradient=True,
[])
I think both outcomes are incorrect, the input should be validated.
其他补充信息 Additional Supplementary Information
Version: paddlepaddle-gpu 3.0.0