From 99b3d602935edcabc8b5e6cd7e3e060c8b41fe89 Mon Sep 17 00:00:00 2001 From: jackalcooper Date: Fri, 25 Aug 2023 17:27:59 +0800 Subject: [PATCH] fix --- oneflow/core/functional/impl/nn_functor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/oneflow/core/functional/impl/nn_functor.cpp b/oneflow/core/functional/impl/nn_functor.cpp index 995cc937bdb..3cf3b4aa9f9 100644 --- a/oneflow/core/functional/impl/nn_functor.cpp +++ b/oneflow/core/functional/impl/nn_functor.cpp @@ -5223,6 +5223,7 @@ class GroupedMatmulFunctor { Maybe operator()(const TensorTuple& xs, const TensorTuple& weights) const { const int64_t input_size = xs.size(); const int64_t weight_size = weights.size(); + CHECK_LT_OR_RETURN(input_size, kMaxInputCount); CHECK_GE_OR_RETURN(input_size, 1) << Error::RuntimeError() << "The number of xs should be greater equal than 1."; CHECK_EQ_OR_RETURN(weight_size, input_size)