Fix NodeDefDataTypeAttributeName for Unary and Binary op converters.#56942
Conversation
tfeher
left a comment
There was a problem hiding this comment.
Thanks Andrei for the fix! The PR looks good to me.
Please change the PR Title: Fix NodeDafDataTypeAttributeName for Unary and Binary op converters.
Please change the PR description:
- To check the input data type, we need to know which attribute of the node defines it. The op converter defines NodeDefDataTypeAttributeName() to return the name of the attribute.
- The actual converters can override this. If an empty string is returned by
NodeDefDataTypeAttributeNamethen type checking is skipped.- Previously the unary and binary op converters returned empty string.
This bug is corrected in this PR.
We will create a separate PR for improving the unit test to catch such errors.
885d3f1 to
b06e7b8
Compare
e318171 to
7e7eacc
Compare
7e7eacc to
2ad795a
Compare
2ad795a to
1111583
Compare
bixia1
left a comment
There was a problem hiding this comment.
Compilation error:
third_party/tensorflow/compiler/tf2tensorrt/convert/ops/einsum.cc:706:40: error: no matching function for call to 'ConvertMatMulImpl'
StatusOr result = ConvertMatMulImpl(
^~~~~~~~~~~~~~~~~
./third_party/tensorflow/compiler/tf2tensorrt/convert/convert_nodes.h:566:27: note: candidate function not viable: 1st argument ('const OpConverterParams const') would lose const qualifier
StatusOr ConvertMatMulImpl(OpConverterParams params,
^
acd1a82 to
fbce5fa
Compare
|
CORRECTED. |
bixia1
left a comment
There was a problem hiding this comment.
There are still similar errors:
third_party/tensorflow/compiler/tf2tensorrt/convert/ops/einsum.cc:713:24: error: no matching function for call to 'ShuffleEinsumOutput'
TF_RETURN_IF_ERROR(ShuffleEinsumOutput(
^~~~~~~~~~~~~~~~~~~
./third_party/tensorflow/core/platform/errors.h:125:37: note: expanded from macro 'TF_RETURN_IF_ERROR'
::tensorflow::Status _status = (VA_ARGS);
^~~~~~~~~~~
third_party/tensorflow/compiler/tf2tensorrt/convert/ops/einsum.cc:513:8: note: candidate function not viable: 1st argument ('const OpConverterParams const') would lose const qualifier
Status ShuffleEinsumOutput(OpConverterParams params, EinsumDescriptor desc_a,
^
ce59b01 to
2ce24e7
Compare
|
FIXED |
This bug is corrected in this PR.