Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TF FE] Support Atan2 operation for TensorFlow models #21076

Merged
merged 42 commits into from
Dec 6, 2023
Merged

[TF FE] Support Atan2 operation for TensorFlow models #21076

merged 42 commits into from
Dec 6, 2023

Conversation

rghvsh
Copy link
Contributor

@rghvsh rghvsh commented Nov 14, 2023

Details:

Tickets:

  • TBD

Adds atan2 operation to the list
Adds atan2 to the list of BinaryOp.
Adds test for Atan2.
@rghvsh rghvsh requested a review from a team as a code owner November 14, 2023 17:21
@github-actions github-actions bot added category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd labels Nov 14, 2023
@rkazants rkazants changed the title Adds Support for Atan2 operation for TensorFlow models [TF FE] Support for Atan2 operation for TensorFlow models Nov 15, 2023
@rkazants rkazants added the ExternalPR External contributor label Nov 15, 2023
@rkazants rkazants changed the title [TF FE] Support for Atan2 operation for TensorFlow models [TF FE] Support Atan2 operation for TensorFlow models Nov 15, 2023
@rkazants
Copy link
Contributor

@rghvsh, please fix build issues:

/d1trimfile:C:\a\1\openvino\ /d1trimfile:C:/a/1/openvino/ -std:c++14 -WX /showIncludes /Fosrc\frontends\tensorflow_common\src\CMakeFiles\openvino_tensorflow_common.dir\Release\op\atan2.cpp.obj /FdC:\a\1\openvino\bin\intel64\Release\ /FS -c C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(14): fatal error C1083: Cannot open include file: 'openvino/op/subttract.hpp': No such file or directory

Please try to build the product locally. Here is instruction https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md. You can build TF FE only

...
cmake ...
make openvino_tensorflow_frontend

@rkazants
Copy link
Contributor

build_jenkins

@rkazants
Copy link
Contributor

@rghvsh, please fix build issues (https://dev.azure.com/openvinoci/dldt/_build/results?buildId=670616&view=logs&j=b5f22b75-a995-5545-eb44-87d86e78d173&t=d8150bbb-90e5-5a93-fe9d-9aeee1771aec&l=1712):

C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(17): error C2039: 'opset8': is not a member of 'ov'
C:\a\1\openvino\src\frontends\tensorflow_common\include\common_op_table.hpp(20): note: see declaration of 'ov'
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(17): error C2871: 'opset8': a namespace with this name does not exist
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(26): error C2065: 'Divide': undeclared identifier
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(26): error C2065: 'y': undeclared identifier
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(26): error C2065: 'x': undeclared identifier
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(27): error C2065: 'Atan': undeclared identifier
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(27): error C3536: 'div_y_x': cannot be used before it is initialized
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(27): error C2672: 'std::make_shared': no matching overloaded function found
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(27): error C2974: 'std::make_shared': invalid template argument for '_Ty', type expected
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\include\memory(1590): note: see declaration of 'std::make_shared'
C:\a\1\openvino\src\frontends\tensorflow_common\src\op\atan2.cpp(28): error C2065: 'x': undeclared identifier

Also, kindly reminder to inser copyright header:

// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

Best regards,
Roman

declares x and y , explicitly mentions conditions
@rkazants
Copy link
Contributor

Hi @rghvsh,

Build issues still exists, unfortunatelly. See details in CI:
image

Best regards,
Roman

@rghvsh
Copy link
Contributor Author

rghvsh commented Dec 3, 2023

Hey! @rkazants

After the last commit the build logs showed that shape was not supported by int data type fixed that and changed it to float.

In the commit history it shows all test passing but in workflow approval it shows 2 expected checks/workflow waiting approval what should I do?

Thank You
Raghav

Makes the range of input inclusive for x<0 and y<0.
@rkazants
Copy link
Contributor

rkazants commented Dec 6, 2023

build_jenkins

@rghvsh
Copy link
Contributor Author

rghvsh commented Dec 6, 2023

@rkazants

ERROR: Package 'ade/0.1.2d' not resolved: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))

how to fix this?

@rkazants
Copy link
Contributor

rkazants commented Dec 6, 2023

@rkazants

ERROR: Package 'ade/0.1.2d' not resolved: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))

how to fix this?

Don't care, this is our infra issue:)
Now I plan to merge this PR.

Thanks,
Roman

@rkazants rkazants enabled auto-merge (squash) December 6, 2023 19:28
@rkazants rkazants merged commit 55d7765 into openvinotoolkit:master Dec 6, 2023
73 checks passed
@ilya-lavrenov ilya-lavrenov added this to the 2023.3 milestone Dec 6, 2023
@rghvsh
Copy link
Contributor Author

rghvsh commented Dec 7, 2023

Thank you @rkazants for helping me through this! My first contribution to a big codebase.

Hoping to make more contributions(and faster) :)

Raghav

@rkazants
Copy link
Contributor

rkazants commented Dec 7, 2023

Thank you @rkazants for helping me through this! My first contribution to a big codebase.

Hoping to make more contributions(and faster) :)

Raghav

Hope you did like it. Sure, take new GFIs and try to apply to GSoC at Intel that requires PRs to openvino:)

Best regards,
Roman

akuporos pushed a commit to akuporos/openvino that referenced this pull request Dec 8, 2023
…t#21076)

* Create atan2.cpp

* Update common_op_table.hpp

Adds atan2 operation to the list

* Update op_table.cpp

Adds atan2 to the list of BinaryOp.

* Create test_tf_Atan2.py

Adds test for Atan2.

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

Co-authored-by: Roman Kazantsev <[email protected]>

* Update src/frontends/tensorflow/src/op_table.cpp

Co-authored-by: Roman Kazantsev <[email protected]>

* Update atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

Co-authored-by: Roman Kazantsev <[email protected]>

* Update atan2.cpp

declares x and y , explicitly mentions conditions

* Update atan2.cpp

* Update atan2.cpp

Adds versions.

* Update atan2.cpp

adds namespace

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update atan2.cpp

Clang format

* Update atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update test_tf_Atan2.py

fixes the datatype of y

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update test_tf_Atan2.py

shape to float

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update test_tf_Atan2.py

Makes the range of input inclusive for x<0 and y<0.

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

---------

Co-authored-by: Roman Kazantsev <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue] [TF FE]: Support Atan2 operation for TensorFlow models
3 participants