From e08c44d0edb52f7d952f965ea97db2c61afad9a6 Mon Sep 17 00:00:00 2001 From: Dmovic <944388576@qq.com> Date: Wed, 29 May 2024 08:10:59 +0000 Subject: [PATCH] update check non negative --- oneflow/core/functional/impl/common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oneflow/core/functional/impl/common.cpp b/oneflow/core/functional/impl/common.cpp index 24b123aee87..06c74ce727a 100644 --- a/oneflow/core/functional/impl/common.cpp +++ b/oneflow/core/functional/impl/common.cpp @@ -204,7 +204,7 @@ Maybe CheckInplaceShapeCanExpandTo(const Shape& shape, const Shape& expand return Maybe::Ok(); } -Maybe CheckSizeNonNegative(const Shape& shape) { +inline Maybe CheckSizeNonNegative(const Shape& shape) { for (const auto& s : shape) { CHECK_OR_THROW(s >= 0) << "Trying to create tensor with negative dimension " << s << ": "