|
|
|
@@ -1763,13 +1763,12 @@ Status GraphPrepare::CheckUserInput(const std::vector<GeTensor> &user_input) { |
|
|
|
GeTensorDesc desc(user_input[index].GetTensorDesc()); |
|
|
|
|
|
|
|
for (size_t i = 0; i < desc.GetShape().GetDimNum(); ++i) { |
|
|
|
if (desc.GetShape().GetDim(i) < 0) { |
|
|
|
std::string situation = "data dim[" + std::to_string(i) + "][" + |
|
|
|
std::to_string(desc.GetShape().GetDim(i)) + "]" ; |
|
|
|
std::string reason = "it need >= 0"; |
|
|
|
int64_t dim = desc.GetShape().GetDim(i); |
|
|
|
if (dim < 0 && dim != UNKNOWN_DIM) { |
|
|
|
std::string situation = "data dim[" + std::to_string(i) + "][" + std::to_string(dim) + "]" ; |
|
|
|
std::string reason = "it need >= -1"; |
|
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E19025", {"situation", "reason"}, {situation, reason}); |
|
|
|
GELOGE(GE_GRAPH_INIT_FAILED, "data dim %zu is not supported, need >= 0, real:%ld.", i, |
|
|
|
desc.GetShape().GetDim(i)); |
|
|
|
GELOGE(GE_GRAPH_INIT_FAILED, "data dim %zu is not supported, need >= -1, real:%ld.", i, dim); |
|
|
|
return GE_GRAPH_INIT_FAILED; |
|
|
|
} |
|
|
|
} |
|
|
|
|