diff options
Diffstat (limited to 'reference_model/src/ops/ewise_unary.cc')
-rw-r--r-- | reference_model/src/ops/ewise_unary.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/reference_model/src/ops/ewise_unary.cc b/reference_model/src/ops/ewise_unary.cc index 8b79e58..8dc37e2 100644 --- a/reference_model/src/ops/ewise_unary.cc +++ b/reference_model/src/ops/ewise_unary.cc @@ -42,6 +42,10 @@ UnaryNode<Rank, Dtype>::~UnaryNode() template <int Rank, DType Dtype> int UnaryNode<Rank, Dtype>::checkTensorAttributes() { + // Check Tosa Level + auto tosa_level = g_func_config.tosa_level; + LEVEL_CHECK(Rank <= tosa_level.MAX_RANK, "Rank should be smaller than or equal to MAX_RANK"); + if (validateRequiredOperands()) return 1; |