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

[Build]: Can't get the test files for paddle #20069

Closed
2 tasks done
AndSonder opened this issue Sep 27, 2023 · 11 comments · Fixed by #20078 or #20161
Closed
2 tasks done

[Build]: Can't get the test files for paddle #20069

AndSonder opened this issue Sep 27, 2023 · 11 comments · Fixed by #20078 or #20161
Assignees
Labels
category: PDPD FE OpenVINO PaddlePaddle FrontEnd support_request

Comments

@AndSonder
Copy link
Contributor

OpenVINO Version

2022.3.0

Operating System

Ubuntu 18.04 (LTS)

Hardware Architecture

x86 (64 bits)

Target Platform

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 2
Core(s) per socket: 10
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz
Stepping: 1
CPU MHz: 2599.968
CPU max MHz: 3400.0000
CPU min MHz: 1200.0000
BogoMIPS: 4800.19
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 25600K
NUMA node0 CPU(s): 0-9,20-29
NUMA node1 CPU(s): 10-19,30-39
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb invpcid_single intel_pt ssbd ibrs ibpb stibp kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts md_clear flush_l1d

Build issue description

When I finish the build, I can't get test files for paddle.

Build scrip or step-by-step to reproduce

cmake -DCMAKE_BUILD_TYPE= Release -DCMAKE_INSTALL_PREFIX="${OPENVINO_BASEDIR}/openvino_dist" -DPYTHON_EXECUTABLE=$(which python) -DENABLE_MYRIAD=OFF -DENABLE_VPU=OFF -DENABLE_PYTHON=ON -DNGRAPH_PYTHON_BUILD_ENABLE=ON -DENABLE_DEBUG_CAPS=ON -DENABLE_CPU_DEBUG_CAPS=ON  -DENABLE_TESTS=ON ..

Relevant log output

none

Issue submission checklist

  • I'm reporting an issue. It's not a question.
  • I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
@AndSonder AndSonder changed the title [Build]: I can't get the test files about paddle [Build]: I can't get the test files for paddle Sep 27, 2023
@Patrick-Star125
Copy link
Contributor

Patrick-Star125 commented Sep 27, 2023

similar problem happened in my device as well. I encountered code errors in incorrect_cut_model.cpp while building openvino with paddle_tests target, which is not supposed to happen because ngraph::Function is commonly existing everywhere across the openvino project.

relevant log output as follow:

[ 87%] Building CXX object src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/incorrect_cut_model.cpp.o
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp: In member function ‘virtual void FrontEndIncorrectCutModelTest_test_incorrect_cut_Test::TestBody()’:
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:30:29: error: ‘Function’ is not a member of ‘ngraph’
   30 |     std::shared_ptr<ngraph::Function> function;
      |                             ^~~~~~~~
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:30:29: error: ‘Function’ is not a member of ‘ngraph’
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:30:37: error: template argument 1 is invalid
   30 |     std::shared_ptr<ngraph::Function> function;
      |                                     ^
In file included from /root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h:62,
                 from /root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:5:
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:31:46: error: cannot convert ‘std::shared_ptr<ov::Model>’ to ‘int’ in assignment
   31 |     ASSERT_THROW(function = frontEnd->convert(inputModel), GeneralFailure);
      |                             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      |                                              |
      |                                              std::shared_ptr<ov::Model>
In file included from /root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:5:
/root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = std::nullptr_t]’:
/root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h:1554:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = std::nullptr_t; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:32:5:   required from here
/root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h:1527:11: error: invalid operands of types ‘const int’ and ‘std::nullptr_t’ to binary ‘operator==’
 1527 |   if (lhs == rhs) {
      |       ~~~~^~~~~~
make[2]: *** [src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/build.make:146: src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/incorrect_cut_model.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5285: src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

the only modification I made is to initiate building paddle test

#src/frontends/paddle/CMakeLists.txt
#if(ENABLE_TESTS)
add_subdirectory(tests)
#endif()

@AndSonder
Copy link
Contributor Author

similar problem happened in my device as well. I encountered code errors in incorrect_cut_model.cpp while building openvino with paddle_tests target, which is not supposed to happen because ngraph::Function is commonly existing everywhere across the openvino project.

relevant log output as follow:

[ 87%] Building CXX object src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/incorrect_cut_model.cpp.o
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp: In member function ‘virtual void FrontEndIncorrectCutModelTest_test_incorrect_cut_Test::TestBody()’:
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:30:29: error: ‘Function’ is not a member of ‘ngraph’
   30 |     std::shared_ptr<ngraph::Function> function;
      |                             ^~~~~~~~
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:30:29: error: ‘Function’ is not a member of ‘ngraph’
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:30:37: error: template argument 1 is invalid
   30 |     std::shared_ptr<ngraph::Function> function;
      |                                     ^
In file included from /root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h:62,
                 from /root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:5:
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:31:46: error: cannot convert ‘std::shared_ptr<ov::Model>’ to ‘int’ in assignment
   31 |     ASSERT_THROW(function = frontEnd->convert(inputModel), GeneralFailure);
      |                             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      |                                              |
      |                                              std::shared_ptr<ov::Model>
In file included from /root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:5:
/root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = std::nullptr_t]’:
/root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h:1554:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = std::nullptr_t; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/root/Github/openvino_3/src/frontends/paddle/tests/incorrect_cut_model.cpp:32:5:   required from here
/root/Github/openvino_3/thirdparty/gtest/gtest/googletest/include/gtest/gtest.h:1527:11: error: invalid operands of types ‘const int’ and ‘std::nullptr_t’ to binary ‘operator==’
 1527 |   if (lhs == rhs) {
      |       ~~~~^~~~~~
make[2]: *** [src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/build.make:146: src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/incorrect_cut_model.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5285: src/frontends/paddle/tests/CMakeFiles/paddle_tests.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

the only modification I made is to initiate building paddle test

#src/frontends/paddle/CMakeLists.txt
#if(ENABLE_TESTS)
add_subdirectory(tests)
#endif()

I also initiate the building paddle test setting. I can finish the build process, but still don't have the test files

@vurusovs
Copy link
Contributor

@AndSonder please, check your CMake output. In case if you observe warning like Python requirement file <path>/openvino/src/frontends/paddle/tests/requirements.txt is not installed, PaddlePaddle frontend unit tests will be skipped, please, install openvino/src/frontends/paddle/tests/requirements.txt

Even if you already installed all required and still observe warning (I got this case), specify set(paddlepaddle_FOUND true) before https://github.com/openvinotoolkit/openvino/blob/releases/2022/3/src/frontends/paddle/tests/CMakeLists.txt#L45C4-L45C22 in order to workaround check of requirements

Please, note that for the moment tests are skipped due python incompatibilities

@AndSonder
Copy link
Contributor Author

AndSonder commented Sep 27, 2023

Thank you very much for your reply. I will try it according to your method. I have another question: Do I need to make relevant Settings like this pr? @vurusovs

@ilya-lavrenov
Copy link
Contributor

Hi @AndSonder
Could you please try #20078 ?
But I have to disable PDPD tests models generation here https://github.com/openvinotoolkit/openvino/pull/20078/files#r1338323726 because I have a lot of errors like:

/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/fluid/executor.py:1479: UserWarning: There are no operators in the program to be executed. If you pass Program manually, please use fluid.program_guard to ensure the current Program is being used.
  warnings.warn(error_info)
I0927 17:20:20.167904 623917 interpretercore.cc:237] New Executor is Running.
/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/static/io.py:969: UserWarning: no variable in your model, please ensure there are any variables in your model to save
  warnings.warn(
/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/fluid/executor.py:1479: UserWarning: There are no operators in the program to be executed. If you pass Program manually, please use fluid.program_guard to ensure the current Program is being used.
  warnings.warn(error_info)
I0927 17:20:21.310081 623999 interpretercore.cc:237] New Executor is Running.
/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/static/io.py:969: UserWarning: no variable in your model, please ensure there are any variables in your model to save
  warnings.warn(
Traceback (most recent call last):
  File "/mnt/data3_1878/ilya/Documents/Programming/git_repo/openvino/src/frontends/paddle/tests/test_models/gen_scripts/generate_mul.py", line 50, in <module>
    paddle_matmul("matmul_xt", input_2x5, input_2x3, x_transpose=True, y_transpose=False)
  File "/mnt/data3_1878/ilya/Documents/Programming/git_repo/openvino/src/frontends/paddle/tests/test_models/gen_scripts/generate_mul.py", line 15, in paddle_matmul
    mul_node = paddle.fluid.layers.matmul(node_x1, node_x2, x_transpose, y_transpose)
AttributeError: module 'paddle.fluid.layers' has no attribute 'matmul'

with newer PDPD version. Do you know what was changed in PDPD?

@AndSonder
Copy link
Contributor Author

matmul

In 2.5 version, PDPD gradually abandoned the previous Fluid architecture, which led to a change in the path of many apis. In the above cases, paddle.fluid.layers.matmul should be used as paddle.matmul

@Asthestarsfalll
Copy link
Contributor

Hi @AndSonder Could you please try #20078 ? But I have to disable PDPD tests models generation here https://github.com/openvinotoolkit/openvino/pull/20078/files#r1338323726 because I have a lot of errors like:

/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/fluid/executor.py:1479: UserWarning: There are no operators in the program to be executed. If you pass Program manually, please use fluid.program_guard to ensure the current Program is being used.
  warnings.warn(error_info)
I0927 17:20:20.167904 623917 interpretercore.cc:237] New Executor is Running.
/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/static/io.py:969: UserWarning: no variable in your model, please ensure there are any variables in your model to save
  warnings.warn(
/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/fluid/executor.py:1479: UserWarning: There are no operators in the program to be executed. If you pass Program manually, please use fluid.program_guard to ensure the current Program is being used.
  warnings.warn(error_info)
I0927 17:20:21.310081 623999 interpretercore.cc:237] New Executor is Running.
/mnt/data3_1878/ilya/.local/lib/python3.9/site-packages/paddle/static/io.py:969: UserWarning: no variable in your model, please ensure there are any variables in your model to save
  warnings.warn(
Traceback (most recent call last):
  File "/mnt/data3_1878/ilya/Documents/Programming/git_repo/openvino/src/frontends/paddle/tests/test_models/gen_scripts/generate_mul.py", line 50, in <module>
    paddle_matmul("matmul_xt", input_2x5, input_2x3, x_transpose=True, y_transpose=False)
  File "/mnt/data3_1878/ilya/Documents/Programming/git_repo/openvino/src/frontends/paddle/tests/test_models/gen_scripts/generate_mul.py", line 15, in paddle_matmul
    mul_node = paddle.fluid.layers.matmul(node_x1, node_x2, x_transpose, y_transpose)
AttributeError: module 'paddle.fluid.layers' has no attribute 'matmul'

with newer PDPD version. Do you know what was changed in PDPD?

You should use lower version of paddle, because lots of apis have been or will be removed from fluid even fluid itself

@AndSonder
Copy link
Contributor Author

Maybe we can support paddle 2.5.1 on another pr.

@ilya-lavrenov
Copy link
Contributor

We cannot merge any PR to paddle FE, because we use python 3.11 in validation, which is supported only since paddle 2.5
So, I expect we need to migrate rather earlier than later, don't we?

@ilya-lavrenov ilya-lavrenov added the category: PDPD FE OpenVINO PaddlePaddle FrontEnd label Sep 27, 2023
@ilya-lavrenov ilya-lavrenov added this to the 2023.2 milestone Sep 27, 2023
@AndSonder
Copy link
Contributor Author

We cannot merge any PR to paddle FE, because we use python 3.11 in validation, which is supported only since paddle 2.5 So, I expect we need to migrate rather earlier than later, don't we?

You are right, I can help you to solve this problem.

@ilya-lavrenov
Copy link
Contributor

Re-opened until migration to paddle 2.5.1 is completed

@ilya-lavrenov ilya-lavrenov reopened this Sep 27, 2023
@ilya-lavrenov ilya-lavrenov linked a pull request Oct 1, 2023 that will close this issue
@ilya-lavrenov ilya-lavrenov removed this from the 2023.2 milestone Nov 16, 2023
@AndSonder AndSonder changed the title [Build]: I can't get the test files for paddle [Build]: Can't get the test files for paddle Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: PDPD FE OpenVINO PaddlePaddle FrontEnd support_request
Projects
None yet
6 participants