Skip to content

Conversation

@NingLi670
Copy link
Contributor

Details:

  • Support complex tensors for Gather, GatherV2 operations
  • Add corresponding layer test

Tickets:

@NingLi670 NingLi670 requested a review from a team as a code owner March 9, 2025 08:01
@github-actions github-actions bot added category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd labels Mar 9, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Mar 9, 2025
@rkazants
Copy link
Collaborator

build_jenkins

@NingLi670
Copy link
Contributor Author

@rkazants I'm not quite familiar with the error [TensorFlow Frontend] Internal error, no translator found for operation(s): ComplexTypeMark. Do you know how I can locate the code where the bug occurs?

FAILED install/tests/layer_tests/tensorflow_tests/test_tf_Gather.py::TestComplexGather::test_gather[ ie_device:CPU - precision:FP16 - indices_type:<class 'numpy.int32'> - params_type:<class 'numpy.float32'> - params:{'params_shape': [3, 2, 6, 4], 'indices_shape': [3, 2, 1, 3], 'axis_value': -1, 'batch_dims': -2, 'operation_type': 'GatherV2'} ] - openvino._pyopenvino.OpConversionFailure: Check 'is_conversion_successful' failed at src/frontends/tensorflow/src/frontend.cpp:478:
FrontEnd API failed with OpConversionFailure:
[TensorFlow Frontend] Internal error, no translator found for operation(s): ComplexTypeMark
To facilitate the conversion of unsupported operations, refer to Frontend Extension documentation: https://docs.openvino.ai/latest/openvino_docs_Extensibility_UG_Frontend_Extensions.html

@NingLi670
Copy link
Contributor Author

@rkazants
Using inputsparams.shape=[3,2,6,4], indices.shape=[3,2,1,3], axis=-1, batch_dims=-2 gets a resulting shape of [3, 2, 6, 1, 3].
When params is complex tensors:
Using inputsparams.shape=[3,2,6,4,2], indices.shape=[3,2,1,3], axis=-2, batch_dims=-3 gets a resulting shape of [3, 2, 6, 2, 1, 3, 2], which is wrong. While using inputsparams.shape=[3,2,6,4,2], indices.shape=[3,2,1,3], axis=3, batch_dims=2 gets a resulting shape of [3, 2, 6, 1, 3, 2]. The later is right. It seems that simplily minusing 1 when axis and batch_dims are negative values is not always right. Do you have any suggestions?

@NingLi670
Copy link
Contributor Author

@rkazants Using inputsparams.shape=[3,2,6,4], indices.shape=[3,2,1,3], axis=-1, batch_dims=-2 gets a resulting shape of [3, 2, 6, 1, 3]. When params is complex tensors: Using inputsparams.shape=[3,2,6,4,2], indices.shape=[3,2,1,3], axis=-2, batch_dims=-3 gets a resulting shape of [3, 2, 6, 2, 1, 3, 2], which is wrong. While using inputsparams.shape=[3,2,6,4,2], indices.shape=[3,2,1,3], axis=3, batch_dims=2 gets a resulting shape of [3, 2, 6, 1, 3, 2]. The later is right. It seems that simplily minusing 1 when axis and batch_dims are negative values is not always right. Do you have any suggestions?

Maybe we can use the shape of params or indices to solve this problem. Can we obtain the shape of any of them when operating Gather or GatherV2?

@NingLi670
Copy link
Contributor Author

In tf.Gather, if batch_dims < 0, it will be converted to batch_dims + rank(indices). So the batch_dims should not minus 1 when the input is complex tensor. The code is updated.

@NingLi670 NingLi670 requested a review from rkazants March 11, 2025 12:28
@NingLi670
Copy link
Contributor Author

@rkazants Can you build the code?

@rkazants
Copy link
Collaborator

build_jenkins

@NingLi670
Copy link
Contributor Author

@rkazants Can you build the code?

@github-actions
Copy link
Contributor

This PR will be closed in a week because of 2 weeks of no activity.

@github-actions github-actions bot added the Stale label May 12, 2025
@NingLi670
Copy link
Contributor Author

@rkazants @mlukasze Can you build the code?

@github-actions github-actions bot removed the Stale label May 20, 2025
@mlukasze
Copy link
Contributor

build_jenkins

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

This PR will be closed in a week because of 2 weeks of no activity.

@github-actions github-actions bot added the Stale label Jun 5, 2025
@github-actions
Copy link
Contributor

This PR was closed because it has been stalled for 2 week with no activity.

@github-actions github-actions bot closed this Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd ExternalPR External contributor Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Good First Issue][TF FE]: Support complex tensors for Gather, GatherV2 operations

4 participants