Enable PDPD tests build (#20078)

* Fixed comments for linux-riscv64 GHA workflow

* Try to enable PDPD tests back
This commit is contained in:
Ilya Lavrenov authored and GitHub committed 2023-09-27 18:03:02 +04:00
1 parent 20172200ea
commit 132bada331
25 files changed
+57 -66

No files matched your search

+1 -1
View File
@@ -369,7 +369,7 @@ jobs:
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXFrontend.xml
displayName: 'ONNX Frontend Tests'
# TODO Reenable PDPD after paddlepaddle==2.5.0 with compliant protobuf is released (ticket 95904)
# TODO Reenable PDPD after paddlepaddle==2.5.1 with compliant protobuf is released (ticket 95904)
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml
displayName: 'Paddle Frontend UT'
enabled: 'false'
+1 -1
View File
@@ -286,7 +286,7 @@ jobs:
LD_LIBRARY_PATH: $(INSTALL_TEST_DIR)
displayName: 'ONNX Frontend Tests'
# TODO Reenable PDPD after paddlepaddle==2.5.0 with compliant protobuf is released (ticket 95904)
# TODO Reenable PDPD after paddlepaddle==2.5.1 with compliant protobuf is released (ticket 95904)
- script: $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml
env:
LD_LIBRARY_PATH: $(INSTALL_TEST_DIR)
+5 -5
View File
@@ -130,8 +130,7 @@ jobs:
python -m pip install -r $(REPO_DIR)\src\bindings\python\wheel\requirements-dev.txt
python -m pip install -r $(REPO_DIR)\src\bindings\python\requirements.txt
rem For running Paddle frontend unit tests
# TODO Reenable PDPD after paddlepaddle==2.5.0 with compliant protobuf is released (ticket 95904)
#python -m pip install -r $(REPO_DIR)\src\frontends\paddle\tests\requirements.txt
python -m pip install -r $(REPO_DIR)\src\frontends\paddle\tests\requirements.txt
rem For running ONNX frontend unit tests
python -m pip install -r $(REPO_DIR)\src\frontends\onnx\tests\requirements.txt
rem For running TensorFlow frontend unit tests
@@ -265,9 +264,10 @@ jobs:
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ONNXFrontend.xml
displayName: 'ONNX Frontend Tests'
# TODO Reenable PDPD after paddlepaddle==2.5.0 with compliant protobuf is released (ticket 95904)
#- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Paddle.xml
# displayName: 'Paddle Frontend UT'
# TODO Reenable PDPD after paddlepaddle==2.5.1 with compliant protobuf is released (ticket 95904)
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Paddle.xml
displayName: 'Paddle Frontend UT'
enabled: 'false'
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Tensorflow.xml
displayName: 'TensorFlow Frontend Unit Tests'
+6 -6
View File
@@ -457,12 +457,12 @@ jobs:
${INSTALL_TEST_DIR}/ov_ir_frontend_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-IRFrontend.xml
# Disabled in Azure: https://github.com/openvinotoolkit/openvino/blob/master/.ci/azure/linux.yml#L403
# - name: PaddlePaddle frontend tests
# run: |
# source ${INSTALL_DIR}/setupvars.sh
# ${INSTALL_TEST_DIR}/paddle_tests --gtest_print_time=1 --gtest_filter=*smoke* \
# --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-PaddleTests.xml
- name: PaddlePaddle frontend tests
if: ${{ 'false' }}
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/paddle_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-PaddleTests.xml
- name: ONNX frontend tests
run: |
+8 -7
View File
@@ -36,7 +36,7 @@ jobs:
shell: bash
runs-on: aks-linux-16-cores
container:
image: ubuntu:22.04
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04
volumes:
- /mount/caches:/mount/caches
env:
@@ -119,18 +119,20 @@ jobs:
# patch settings.yml to contain riscv64 architecture
sed -i 's/sparcv9/riscv64/g' ~/.conan2/settings.yml
# generate host profile for linux_riscv64
echo "include(default)" > ${OPENVINO_BUILD_DIR}/linux_riscv64
echo "[buildenv]" >> ${OPENVINO_BUILD_DIR}/linux_riscv64
echo "CC=riscv64-linux-gnu-gcc" >> ${OPENVINO_BUILD_DIR}/linux_riscv64
echo "CXX=riscv64-linux-gnu-g++" >> ${OPENVINO_BUILD_DIR}/linux_riscv64
echo "include(default)" > ${CONAN_LINUX_RISCV64_PROFILE}
echo "[buildenv]" >> ${CONAN_LINUX_RISCV64_PROFILE}
echo "CC=riscv64-linux-gnu-gcc" >> ${CONAN_LINUX_RISCV64_PROFILE}
echo "CXX=riscv64-linux-gnu-g++" >> ${CONAN_LINUX_RISCV64_PROFILE}
# install OpenVINO dependencies
conan install ${OPENVINO_REPO}/conanfile.txt \
-pr:h ${OPENVINO_BUILD_DIR}/linux_riscv64 \
-pr:h ${CONAN_LINUX_RISCV64_PROFILE} \
-s:h arch=riscv64 \
-s:h build_type=${CMAKE_BUILD_TYPE} \
-o:h onetbb/*:tbbbind=False \
-of ${OPENVINO_BUILD_DIR}/dependencies \
-b missing
env:
CONAN_LINUX_RISCV64_PROFILE: ${{ env.OPENVINO_BUILD_DIR }}/linux_riscv64
#
# Build
@@ -147,7 +149,6 @@ jobs:
-DENABLE_PYTHON=ON \
-DENABLE_WHEEL=ON \
-DPYTHON_MODULE_EXTENSION=$(riscv64-linux-gnu-python3-config --extension-suffix) \
-DPython3_INCLUDE_DIR=$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))") \
-DPYBIND11_PYTHON_EXECUTABLE_LAST=${OPENVINO_BUILD_DIR}/env/bin/python3.10 \
-DENABLE_TESTS=ON \
-DTHREADING=SEQ \
+1 -1
View File
@@ -16,7 +16,7 @@ patchelf<=0.17.2.1
# Frontends
docopt~=0.6.2
paddlepaddle==2.4.2
paddlepaddle==2.5.1
tensorflow>=1.15.5,<2.14.0
six~=1.16.0
protobuf>=3.18.1,<4.0.0
+3 -4
View File
@@ -4,7 +4,6 @@
add_subdirectory(src)
# ticket 95904
#if(ENABLE_TESTS AND Python_VERSION_MINOR LESS 11)
# add_subdirectory(tests)
#endif()
if(ENABLE_TESTS)
add_subdirectory(tests)
endif()
+4 -2
View File
@@ -36,12 +36,14 @@ endif()
if(NOT EXIT_CODE EQUAL 0)
set(paddlepaddle_FOUND OFF)
message(WARNING "Python requirement file ${PADDLE_REQ} is not installed, PaddlePaddle testing models weren't generated,
some tests will fail due models not found")
message(WARNING "Python requirement file ${PADDLE_REQ} is not installed, PaddlePaddle testing models weren't generated, some tests will fail due models not found")
else()
set(paddlepaddle_FOUND ON)
endif()
# PDPD 2.5.1 is not compatible with tests models we use
set(paddlepaddle_FOUND OFF)
set(TEST_PADDLE_MODELS_DIRNAME test_model_zoo/paddle_test_models)
target_compile_definitions(${TARGET_NAME} PRIVATE -D TEST_PADDLE_MODELS_DIRNAME=\"${TEST_PADDLE_MODELS_DIRNAME}/\")
-1
View File
@@ -6,7 +6,6 @@
#include "paddle_utils.hpp"
using namespace ngraph;
using namespace ov::frontend;
using PaddleBasicTest = FrontEndBasicTest;
@@ -6,11 +6,10 @@
#include <openvino/frontend/manager.hpp>
#include "common_test_utils/ov_test_utils.hpp"
#include "openvino/opsets/opset6.hpp"
#include "paddle_utils.hpp"
#include "utils.hpp"
#include "openvino/opsets/opset6.hpp"
using namespace ngraph;
using namespace ov::frontend;
TEST(FrontEndConvertModelTest, test_unsupported_op) {
@@ -23,18 +22,18 @@ TEST(FrontEndConvertModelTest, test_unsupported_op) {
std::string("relu_unsupported/relu_unsupported.pdmodel"));
ASSERT_NO_THROW(inputModel = frontEnd->load(model_filename));
ASSERT_NE(inputModel, nullptr);
std::shared_ptr<ngraph::Function> function;
ASSERT_THROW(function = frontEnd->convert(inputModel), OpConversionFailure);
ASSERT_EQ(function, nullptr);
ASSERT_NO_THROW(function = frontEnd->decode(inputModel));
ASSERT_THROW(frontEnd->convert(function), OpConversionFailure);
ASSERT_NO_THROW(function = frontEnd->convert_partially(inputModel));
ASSERT_THROW(frontEnd->convert(function), OpConversionFailure);
std::shared_ptr<ov::Model> model;
ASSERT_THROW(model = frontEnd->convert(inputModel), OpConversionFailure);
ASSERT_EQ(model, nullptr);
ASSERT_NO_THROW(model = frontEnd->decode(inputModel));
ASSERT_THROW(frontEnd->convert(model), OpConversionFailure);
ASSERT_NO_THROW(model = frontEnd->convert_partially(inputModel));
ASSERT_THROW(frontEnd->convert(model), OpConversionFailure);
for (auto& node : function->get_ordered_ops()) {
for (auto& node : model->get_ordered_ops()) {
if (node->get_friendly_name() == "rxyz_0.tmp_0") {
function->replace_node(node, std::make_shared<ov::opset6::Relu>(node->input(0).get_source_output()));
model->replace_node(node, std::make_shared<ov::opset6::Relu>(node->input(0).get_source_output()));
}
}
ASSERT_NO_THROW(frontEnd->convert(function));
ASSERT_NO_THROW(frontEnd->convert(model));
}
@@ -6,7 +6,6 @@
#include "paddle_utils.hpp"
using namespace ngraph;
using namespace ov::frontend;
using PaddleCutTest = FrontEndCutModelTest;
@@ -10,7 +10,6 @@
#include "paddle_utils.hpp"
#include "utils.hpp"
using namespace ngraph;
using namespace ov::frontend;
TEST(FrontEndIncorrectCutModelTest, test_incorrect_cut) {
@@ -27,7 +26,7 @@ TEST(FrontEndIncorrectCutModelTest, test_incorrect_cut) {
// remove second input
inputModel->override_all_inputs({inputModel->get_inputs()[0]});
std::shared_ptr<ngraph::Function> function;
ASSERT_THROW(function = frontEnd->convert(inputModel), GeneralFailure);
ASSERT_EQ(function, nullptr);
std::shared_ptr<ov::Model> model;
ASSERT_THROW(model = frontEnd->convert(inputModel), GeneralFailure);
ASSERT_EQ(model, nullptr);
}
-1
View File
@@ -6,7 +6,6 @@
#include "paddle_utils.hpp"
using namespace ngraph;
using namespace ov::frontend;
using PaddleCutTest = FrontEndLoadFromTest;
+1 -5
View File
@@ -6,13 +6,9 @@
#include <fstream>
#include "ngraph/ngraph.hpp"
#include "paddle_utils.hpp"
#include "common_test_utils/test_control.hpp"
#include "paddle_utils.hpp"
using namespace ngraph;
using namespace InferenceEngine;
using namespace ngraph;
using namespace ov::frontend;
using PaddleFuzzyOpTest = FrontEndFuzzyOpTest;
+1 -1
View File
@@ -6,7 +6,7 @@
#include "paddle_utils.hpp"
using namespace ngraph;
using namespace ov;
using namespace ov::frontend;
using PaddlePartialShapeTest = FrontEndPartialShapeTest;
+1 -1
View File
@@ -3,4 +3,4 @@
protobuf
numpy
six
paddlepaddle; python_version<'3.11'
paddlepaddle
@@ -6,7 +6,6 @@
#include "paddle_utils.hpp"
using namespace ngraph;
using namespace ov::frontend;
using PaddleCutTest = FrontEndElementTypeTest;
@@ -90,7 +90,7 @@ def deformable_conv(name: str, x, weight, offset, mask, bias, stride=1, padding=
feed=feed_dict,
fetch_list=node_out)
# Save inputs in order of ngraph function, to facilite Fuzzy test,
# Save inputs in order of OpenVINO model, to facilite Fuzzy test,
# which accepts inputs and outputs in this order as well.
saveModel(name, exe, feedkeys=list(feed_dict.keys()), fetchlist=[node_out],
inputs=inputs_list, outputs=outs, target_dir=sys.argv[1] if len(sys.argv) > 1 else '.')
@@ -120,7 +120,7 @@ def get_output_size(input_size, out_channels, kernel_size, stride, padding, dila
# ref: https://www.paddlepaddle.org.cn/documentation/docs/en/api/paddle/vision/ops/deform_conv2d_en.html
# PaddlePaddle conv attributes padding, strides, dilation can optionally be int|lit|tuple,
# while they are list of int in ngraph.
# while they are list of int in OpenVINO.
def generator(input_size=[2, 8, 4, 4], # NCHW
out_channels=4,
kernel_size=[3, 3], # spatial_kernel
@@ -14,7 +14,7 @@ from save_model import saveModel
def ngraph_embedding(ids, vocab_embeddings, vocab_size, embedding_dim, padding_idx, sparse):
"""
decomposing embedding with ngraph ops.
decomposing embedding with OpenVINO ops.
"""
import ngraph as ng
from ngraph import opset8 as opset
@@ -63,7 +63,7 @@ def generate_proposals_v2(name: str, input_data: dict, attr: dict):
fetch_list=[rois, roi_probs, rois_num],
return_numpy=False)
# Save inputs in order of ngraph function, to facilite Fuzzy test,
# Save inputs in order of OpenVINO model, to facilite Fuzzy test,
# which accepts inputs and outputs in this order as well.
saveModel(name, exe, feedkeys=['scores', 'bbox_deltas', 'im_shape', 'anchors', 'var'],
fetchlist=[rois, roi_probs, rois_num],
@@ -41,7 +41,7 @@ def prior_box(name: str, input_data, image_data, attrs: dict):
feed={'Input': input_data, 'Image': image_data},
fetch_list=[box, var])
# Save inputs in order of ngraph function, to facilite Fuzzy test,
# Save inputs in order of OpenVINO model, to facilite Fuzzy test,
# which accepts inputs and outputs in this order as well.
saveModel(name, exe, feedkeys=['Input', 'Image'], fetchlist=[box, var],
inputs=[input_data, image_data], outputs=outs, target_dir=sys.argv[1])
@@ -31,7 +31,7 @@ def strided_slice(name: str, input_data, attrs: dict):
feed={'x': input_data},
fetch_list=[out])
# Save inputs in order of ngraph function, to facilite Fuzzy test,
# Save inputs in order of OpenVINO model, to facilite Fuzzy test,
# which accepts inputs and outputs in this order as well.
saveModel(name, exe, feedkeys=['x'], fetchlist=[out],
inputs=[input_data], outputs=[outs[0]], target_dir=sys.argv[1])
@@ -34,7 +34,7 @@ def yolo_box(name : str, x, img_size, attrs : dict):
feed={'x': x, 'img_size': img_size},
fetch_list=[boxes, scores])
# Save inputs in order of ngraph function, to facilite Fuzzy test,
# Save inputs in order of OpenVINO model, to facilite Fuzzy test,
# which accepts inputs and outputs in this order as well.
saveModel(name, exe, feedkeys=['x', 'img_size'], fetchlist=[boxes, scores],
inputs=[x, img_size], outputs=outs, target_dir=sys.argv[1])
@@ -87,7 +87,7 @@ def NMS(name: str, bboxes, scores, attrs: dict, rois_num=None, verbose=False):
# There is a bug in paddledet that dtype of model var mismatch its output LodTensor.
# Specifically, it is 'Index' is 'int64', while its LodTensor of 'int32'.
# This will lead to a failure in ngraph frontend op fuzzy test.
# This will lead to a failure in OpenVINO frontend op fuzzy test.
# So here is an workaround to align the dtypes.
out = np.array(output_lod.pop(0))
nms_rois_num = np.array(
@@ -95,7 +95,7 @@ def NMS(name: str, bboxes, scores, attrs: dict, rois_num=None, verbose=False):
index = np.array(output_lod.pop(0)).astype(pdpd.fluid.data_feeder.convert_dtype(
output[2].dtype)) if output[2] is not None else None
# Save inputs in order of ngraph function, to facilite Fuzzy test,
# Save inputs in order of OpenVINO model, to facilite Fuzzy test,
# which accepts inputs and outputs in this order as well.
output_np = [out, nms_rois_num, index]
saveModel(name,
@@ -9,7 +9,6 @@
#include "paddle_utils.hpp"
#include "utils.hpp"
using namespace ngraph;
using namespace ov::frontend;
TEST(FrontEndConvertModelTest, throw_in_conversion) {
@@ -22,8 +21,8 @@ TEST(FrontEndConvertModelTest, throw_in_conversion) {
std::string(TEST_PADDLE_MODELS_DIRNAME) + std::string("throw_in_conversion/throw_in_conversion.pdmodel"));
ASSERT_NO_THROW(inputModel = frontEnd->load(model_filename));
ASSERT_NE(inputModel, nullptr);
std::shared_ptr<ngraph::Function> function;
ASSERT_THROW(function = frontEnd->convert(inputModel), OpConversionFailure);
std::shared_ptr<ov::Model> model;
ASSERT_THROW(model = frontEnd->convert(inputModel), OpConversionFailure);
}
TEST(FrontEndConvertModelTest, unsupported_version) {