We only need the C++ type and the corresponding TF Enum. The other
parameter was used for the output spec json file, but we can just
standardize on the C++ type name there.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This TypeSpec will no longer match specs generated by stringifying tensorflow types. For example.
In [4]: tf.int64.name Out[4]: 'int64'
meaning we will have to do the string conversion in python instead of in C++; either way we can't really get away from it. Your choice where you want us to do it.
This is intentional. We mainly wanted to avoid a third type alias, i.e. we have LLVM's aliases (float, doble, int32_t, etc); and tensorflow's enums (TF_FLOAT, TF_DOUBLE, TF_INT32). The uses of these 2 groups is typechecked. The one we eliminated, the string, which was only used in json, was not. Arguably, the resulting code is more robust.
Yes, Mircea and I discussed about it. Doing conversion in either place is fine. The argument of doing the it here is better isolation of TF and LLVM and easier testing in LLVM