Skip to content

Commit

Permalink
Comment added
Browse files Browse the repository at this point in the history
Change-Id: I3e2d29ef201283de337168d0b82679b63ca2fcf4
  • Loading branch information
d-smirnov committed Mar 18, 2021
1 parent 98f078c commit 3699924
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/tvm/relay/frontend/tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2335,6 +2335,11 @@ def convert_cast(self, op):
assert len(input_tensors) == 1, "input tensors length should be 1"
input_tensor = input_tensors[0]
in_expr = self.get_expr(input_tensor.tensor_idx)

# MLIR-based converter outputs no BuiltinOptions for Cast operator. In this
# case the output type can be derived from the Cast operator output tensor.
# When TOCO converter is used there will be "normal" BuiltinOptions.CastOptions
# with output type.
if op.BuiltinOptions() is not None:
assert op.BuiltinOptionsType() == BuiltinOptions.CastOptions
op_options = op.BuiltinOptions()
Expand Down

0 comments on commit 3699924

Please sign in to comment.