Oneflow-Inc / oneflow

OneFlow is a deep learning framework designed to be user-friendly, scalable and efficient.
http://www.oneflow.org
Apache License 2.0
5.79k stars 658 forks source link

negative dimensions should not be allowed in 'oneflow.full' #10446

Open Redmept1on opened 3 months ago

Redmept1on commented 3 months ago

Summary

When the oneflow.full parameter size contains negative values, the program aborted, there's a 'core dumped'.

Code to reproduce bug

import oneflow as flow
import numpy as np

size = (-1, 2)

full_array = flow.full(size, 2)
print(full_array)

image

System Information