-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
【Hackathon 5th No.113】Support paddle 2.5.1 #20161
【Hackathon 5th No.113】Support paddle 2.5.1 #20161
Conversation
@ilya-lavrenov We can talk about paddle2.5 support here. |
src/frontends/paddle/tests/test_models/gen_scripts/generate_mul.py
Outdated
Show resolved
Hide resolved
src/frontends/paddle/tests/test_models/gen_scripts/generate_prior_box.py
Outdated
Show resolved
Hide resolved
src/frontends/paddle/tests/test_models/gen_scripts/generate_prior_box.py
Outdated
Show resolved
Hide resolved
src/frontends/paddle/tests/test_models/gen_scripts/generate_reduce_all.py
Outdated
Show resolved
Hide resolved
…nvino into support-paddle-2.5
…into support-paddle-2.5
src/frontends/paddle/tests/test_models/gen_scripts/generate_place_test_model.py
Outdated
Show resolved
Hide resolved
src/frontends/paddle/tests/test_models/gen_scripts/generate_pow.py
Outdated
Show resolved
Hide resolved
src/frontends/paddle/tests/test_models/gen_scripts/generate_pow.py
Outdated
Show resolved
Hide resolved
never mind, it was fixed in #21473 |
Please help to approve the workflows ~ @meiyang-intel |
Any other suggestions? |
I have no other concerns. Let's wait for the CI. Thanks for your effort. |
ok~ |
* Fixed comments for linux-riscv64 GHA workflow * Try to enable PDPD tests back * support paddle 2.5 * fix op test errors * fix op test errors * recover openvino/src/core/src/op/swish.cpp * recover thirdparty open_model_zoo * update cmakelist * disable some tests * fix code style * enable paddle ci tests * disable some tests * fix np.long error * recover reverse op * update ci config * recover set_value test codes * rm linux_debian.yml * Compatible with cases where different paddle versions have different output shapes * remove set_value tests * recover save_model.py * Added ctest labels for FE tests only if FW is found * recover thirdparty * Update CMakeLists.txt Fixed creation of paddle_tests target two times * update paddle v2.5.1 proto file * recover thirdparty * fix Paddle_Reader_Tests.LoadModelMemoryToCore error * fix Paddle_Places test issue in v2.5.1 * support some tests for low version paddle * fix paddle FrontEndCutModelTest issue * fix * support all other tests for low version paddle * fix codestyle * fix codestyle * Update generate_multi_tensor_split.py * fix build error * add testUnloadLibBeforeDeletingDependentObject into paddle skip tests config * remove PROTOBUF_LITE from paddle CmakeList.txt * fix path error * add debug info * add debug codes * use make_model_path * recover * add option optimize_for * use FrontEndTestUtils in read_paddle_model_test.cpp * use FrontEndTestUtils in read_paddle_model_test.cpp * fix grid_sample error when using dynamic shape * fix error tests for 2.4 version * add paddle version judge for floor_div * fix grid_sample and add tests * fix * fix * recover * recover grid_sampler * Apply suggestions from code review * fix * Apply suggestions from code review * Apply suggestions from code review * fix build error --------- Co-authored-by: Ilya Lavrenov <[email protected]> Co-authored-by: meiyang-intel <[email protected]>
Details:
Overview
1. Background
Currently, OpenVINO supports PaddlePaddle version 2.4.1. However, PaddlePaddle version 2.5 introduced many new operators that are not compatible with OpenVINO. Additionally, PaddlePaddle 2.4 does not support Python 3.11. Therefore, it is necessary to upgrade OpenVINO to support PaddlePaddle version 2.5.1.
2. Default Lack of PaddlePaddle Support in OpenVINO
OpenVINO does not natively support PaddlePaddle 2.5 and requires manual activation. Enabling PaddlePaddle support in OpenVINO can lead to compilation errors due to issues with compiling PaddlePaddle-related components.
Related Issue for Discussion: #20069
3. Significance
PaddlePaddle 2.5.1 introduces many new operators that are not compatible with OpenVINO. Upgrading OpenVINO to support PaddlePaddle 2.5.1 will provide better support for PaddlePaddle models.
Problem Analysis
OpenVINO does not natively support PaddlePaddle 2.5, and enabling it manually can lead to compilation errors. This is because the PaddlePaddle-related code in OpenVINO is currently based on PaddlePaddle 2.4, and PaddlePaddle 2.5 has introduced changes to many API interfaces, causing compilation issues in OpenVINO.
The reasons for compilation errors can be categorized as follows:
paddle.fluid.layers.elementwise_add
->paddle.add
elementwise_no_equal
->no_equal
Solution Design
To make OpenVINO compatible with PaddlePaddle 2.5, we need to address the two issues mentioned above. The specific solutions are as follows:
1. Mapping Old API Names to New API Names
We need to establish mappings between the old and new API names so that the OpenVINO code can use the new API names, thus resolving compilation errors caused by changes in API names. This mapping can be referenced from the PaddlePaddle official API mapping table.
This part mainly involves the following tasks:
generate_xxx.py
files for changes in API input parameters.2. Modifying Operators with Name/Attribute Changes
For certain C++ operators, such as
elementwise_no_equal
->no_equal
andelementwise_equal
->equal
, we need to modify the operator names in OpenVINO to resolve compilation errors caused by changes in C++ operator names and attributes.This part mainly involves the following tasks:
3. Fixing Errors Due to API Changes
Some APIs have undergone logic changes before and after migration, leading to test errors in OpenVINO. Addressing this requires making specific modifications based on the nature of the error.
Attachments and References
Results
./paddle_tests --gtest_filter=PaddleFuzzyOpTest/FrontEndFuzzyOpTest.testOpFuzzy/paddle_*
Can pass all of the tests in the PaddleFuzzyOpTest.
Tickets: