One: Compiler FE: TF 2.4 version upgrade

Created on 14 Jan 2021  路  5Comments  路  Source: Samsung/ONE

TensorFlow has release 2.4.0 last month.
Let's find out if there are any problems to upgrade to TF 2.4.0

Points to check

  • Tool upgrade issue
  • circle format compatibility issue

Why?

  • TF released this new version
  • onnx-tensorflow (latest 1.8) uses 2.4.0

Most helpful comment

Schema Update

As I said before, there is a big issue in TF 2.4.0 related with scehma.

As a result, we should investigate how much our current codes should be modified.
However, I think it may not be easy because circle schema implemented BuiltinOperator as ubyte like below

enum BuiltinOperator : ubyte {
  ...
  BCQ_GATHER = 252,
  BCQ_FULLY_CONNECTED = 253,
  INSTANCE_NORM = 254,
}

and thus 252, 253, 254 may conflict in near future.
We should avoid it and it means that we may change our circle schema.

All 5 comments

Schema Update

As I said before, there is a big issue in TF 2.4.0 related with scehma.

As a result, we should investigate how much our current codes should be modified.
However, I think it may not be easy because circle schema implemented BuiltinOperator as ubyte like below

enum BuiltinOperator : ubyte {
  ...
  BCQ_GATHER = 252,
  BCQ_FULLY_CONNECTED = 253,
  INSTANCE_NORM = 254,
}

and thus 252, 253, 254 may conflict in near future.
We should avoid it and it means that we may change our circle schema.

@llFreetimell , thanks for reminding about schema change :)

Can we do like this?

  • Use TF2.4 to read TF files
  • Use TF2.4 tflite converter to write converted tflite files
  • tflite2circle as-is: still tflite file written with 2.4 will have backward compatibility

There can be loses but may work for now...

@seanshpark

Until tflite operator reached at 252(currently, top value is 128(CUMSUM)), I think it may works without any loss :)
What we need to do is just adding new operators and changing function name.

However, if tflite operator becomes larger than 251, circle schema must be changed..!

What we need to do is just adding new operators and changing function name.

I think we should do this (I assume new operators is our circle native ops) after frontend and runtime migrate to new schema...

However, if tflite operator becomes larger than 251, circle schema must be changed..!

Certainly!

Python 3.5 EOF(End Of Life)

Until Tensorflow 2.3, python 3.5 was supported.
However, as python 3.5 is EOF, Tensorflow dropped supporting python 3.5.
As a result, python 3.5 is not supported from Tensorflow 2.4.0

Users who use higher version than 3.5 have no problem, but we may need to check whether there is dependent thing with Python 3.5.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YongseopKim picture YongseopKim  路  3Comments

mhs4670go picture mhs4670go  路  4Comments

KimDongEon picture KimDongEon  路  4Comments

mhs4670go picture mhs4670go  路  3Comments

periannath picture periannath  路  3Comments