One: Compiler FE: Enable Round Operator

Created on 5 Jun 2020  路  8Comments  路  Source: Samsung/ONE

  • [x] tflchef #2002
  • [x] luci.IR #2357
  • [x] luci.Import #2357
  • [x] luci.Export #2357
  • [x] luci.logex #2376
  • [x] luci.Service #2357
  • [x] res/TensorFlowPythonExamples #2358
  • [x] res/TensorFlowLiteRecipes #2004 (@d-krylov)
  • [x] tflite2circle nothing to do, this operator has no options
  • [x] luci.tests #2357
  • [x] tfldump nothing to do
  • [x] circledump nothing to do

for #1606

draft #1924

Most helpful comment

Everything is done, closing

All 8 comments

Note: I wasn't able to create this operator via tflite converter.
For some reason, TF2.2 converts tf.math.round as a custom operator.

As I wrote in https://github.com/Samsung/ONE/issues/1606#issuecomment-642935352, I'd like to continue this work cause of schedule issue

node {
  name: "round"
  op: "Round"
  input: "Placeholder"
  attr {
    key: "T"
    value {
      type: DT_FLOAT
    }
  }
}
Operator Codes: [order] OpCodeName (OpCode Enum)
[0] ROUND (code: 116, version: 1)

Buffers: B(index) (length) values, if any
B(0) (0)
B(1) (0)
B(2) (0)
B(3) (16) 0x31 0x2e 0x31 0x34 0x2e 0x30 00 00 00 00 00 00 00 00 00 00 ...

-------------------------------------------------------------------
Sub-Graph: #0 main

Operands: T(subgraph index : tensor index) TYPE (shape) (shape_signature) B(buffer index) OperandName
T(0:0) FLOAT32 (2, 3) B(1) Placeholder
T(0:1) FLOAT32 (2, 3) B(2) round

Operators: O(subgraph index : operator index) OpCodeName
    Option(values) ... <-- depending on OpCode
    I T(tensor index) OperandName <-- as input
    O T(tensor index) OperandName <-- as output
O(0:0) ROUND
    I T(0:0) Placeholder
    O T(0:1) round

Inputs/Outputs: I(input)/O(output) T(tensor index) OperandName
I T(0:0) Placeholder
O T(0:1) round

For some reason, TF2.2 converts tf.math.round as a custom operator.

I think you wasn't running in TF 2.2. it may been 1.x

I think you wasn't running in TF 2.2. it may been 1.x

Indeed. I checked, It was 2.0.0.b1 =_=

@seanshpark FYI
I rebased recipe in #2004
You can merge it if you want (or not, if it is faster to make it yourself)

Everything is done, closing

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dr-venkman picture dr-venkman  路  4Comments

seanshpark picture seanshpark  路  3Comments

underflow101 picture underflow101  路  4Comments

binarman picture binarman  路  3Comments

jinevening picture jinevening  路  3Comments