ONE icon indicating copy to clipboard operation
ONE copied to clipboard

Revise circle schema

Open seanshpark opened this issue 2 years ago • 8 comments

Let's revise circle schema base from TF 2.7.0, schma_v3b.fbs.

seanshpark avatar Mar 17 '22 00:03 seanshpark

Related #6216

CC @hseok-oh , @chunseoklee

seanshpark avatar Mar 17 '22 00:03 seanshpark

Background

  • revise common schema may break compile/runtime build

Preliminary plan for compiler modules

  • introduce schema copy in res for compiler
  • revise mio-circle to use the copy
  • (runtime can start upgrading)
  • add new (based on v3b) schema as v0.4 and introduce mio-circle04
  • revise modules to use mio-circle04 one by one
  • after runtime finishes revision, change mio-circle04 to use common schema

seanshpark avatar Mar 17 '22 00:03 seanshpark

Schema draft: #8442

hseok-oh avatar Mar 17 '22 00:03 hseok-oh

Modules to work

  • [x] add mio-circle04
  • [x] circledump
  • [ ] circlechef
    • [ ] forward
    • [ ] reverse
  • [x] tflite2circle
  • [x] luci import
  • [x] luci export
  • [x] circle-inspect
  • [x] ciecle-tensordump
  • [x] circle-verify
  • [x] pota-quantization-value-test
  • [ ] tflite2circle SignatureDef
    • [ ] and input/output tensor order match
    • [ ] luci import/export with SignatureDef ?
  • [ ] ...
  • [x] modules with require("mio-circle") in CMakeLists.txt

seanshpark avatar Mar 17 '22 03:03 seanshpark

@chunseoklee , @hseok-oh , new schema has now SignatureDef field in the format (currently not migrated from tflite but will work on this soon). Do you think we need this? If so, can you share any benefits you can think of?

seanshpark avatar Mar 24 '22 04:03 seanshpark

@chunseoklee , @hseok-oh , new schema has now SignatureDef field in the format (currently not migrated from tflite but will work on this soon). Do you think we need this? If so, can you share any benefits you can think of?

  1. I am not used to SignatureDef field(seems like custom IO description)
  2. Not planned to process it on onert side. But, we may need in the future.

chunseoklee avatar Mar 24 '22 04:03 chunseoklee

@chunseoklee , OK. I think it would be better to take some time and understand SignatureDef.

In short, my short understanding of one of the feature is that, this provides input and output node order. Previous version was the tensor (operand) order itself was the input/output order. Now, SignatureDef provides the order and the tensor (operand) may be in unordered sequence. I also don't fully understand the purpose of SignatureDef.

seanshpark avatar Mar 24 '22 07:03 seanshpark

OK. I think it would be better to take some time and understand SignatureDef.

I agree. I will take a look at sugnaturedef from TFL's viewpoint.

At a glance, (maybe I am wrong)

  1. In TFL interpreter, signature itself is experimental
  2. In schema, signaturedef is optional.

It is strange that SignatureDef affects conversion process even although optional. Anyway, I will take a look

chunseoklee avatar Mar 24 '22 07:03 chunseoklee