KhronosGroup / NNEF-Docs

NNEF public repository
Apache License 2.0
14 stars 3 forks source link

Table 1 expression operators #14

Closed zoeoz closed 5 years ago

zoeoz commented 5 years ago

Happy New Year, everyone!

I have some questions about Table 1 expression operators that I would like to clarify. The spec says:

Arithmetic operators that are applicable to scalar are also applicable to integer arguments (but not mixed), in which case the result is also an integer. Comparison operators that are applicable to any primitive type (marked by ? below just like generic types) must have arguments of the same type.

and also:

All operators are also applicable to tensors, hence they are not listed here explicitly. In this case, the result is also a tensor (of the appropriate data-type). If at least one of the arguments is a tensor, the operation is mapped to the appropriate fragment. In this case, argument types must be checked in the same way as if the fragment was explicitly called.

Since the corresponding unary and binary fragment operations are not defined in NNEF for integer tensors, and since the eq and ne fragments are not defined for generic tensor types, my understanding of what Table 1 would look like with all explicit options included is this:

nnef-tables.pdf

Specifically:

Does this seem right?

gyenesvi commented 5 years ago

Happy new year! Yes, this seems right.

zoeoz commented 5 years ago

Perfect. Thank you!