Skip to content

Commit

Permalink
[onert] Add type validation check for RoPE
Browse files Browse the repository at this point in the history
- check data type of sin/cos input

ONE-DCO-1.0-Signed-off-by: youngsik kim <ys44.kim@samsung.com>
  • Loading branch information
ys44kim committed Oct 2, 2024
1 parent c43dfa6 commit ad223c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/onert/core/src/ir/OperationValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ void OperationValidator::visit(const operation::RoPE &node)
const auto output_index{node.getOutputs().at(operation::RoPE::Output::OUTPUT)};

OP_REQUIRES(isValidType(input_index, DataType::FLOAT32));
OP_REQUIRES(isValidType(sin_index, DataType::FLOAT32));
OP_REQUIRES(isValidType(cos_index, DataType::FLOAT32));
OP_REQUIRES(isSameType(input_index, output_index));
}

Expand Down

0 comments on commit ad223c2

Please sign in to comment.