Rename "pdpd" frontend to "paddle" (#6842)
* Rename "pdpd" frontend to "paddle" Also renamed mo_pdpd.py+main_pdpd.py to mo_paddle.py+main_paddle.py Class names were not renamed * Update package_BOM.txt
This commit is contained in:
1 parent
0f6e4afa71
commit
a95d59014c
18 files changed
+69
-64
No files matched your search
@@ -61,7 +61,7 @@ endif()
|
||||
|
||||
if(NGRAPH_PDPD_FRONTEND_ENABLE)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE
|
||||
PDPD_TEST_MODELS="${CMAKE_CURRENT_SOURCE_DIR}/pdpd_reader/models/")
|
||||
PADDLE_TEST_MODELS="${CMAKE_CURRENT_SOURCE_DIR}/paddle_reader/models/")
|
||||
add_dependencies(${TARGET_NAME} paddlepaddle_ngraph_frontend)
|
||||
endif()
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -15,7 +15,7 @@
|
||||
#include "common_test_utils/ngraph_test_utils.hpp"
|
||||
|
||||
TEST(PDPD_Reader_Tests, ImportBasicModelToCore) {
|
||||
auto model = std::string(PDPD_TEST_MODELS) + "relu.pdmodel";
|
||||
auto model = std::string(PADDLE_TEST_MODELS) + "relu.pdmodel";
|
||||
InferenceEngine::Core ie;
|
||||
auto cnnNetwork = ie.ReadNetwork(model);
|
||||
auto function = cnnNetwork.getFunction();
|
||||
@@ -48,7 +48,7 @@ TEST(PDPD_Reader_Tests, ImportBasicModelToCore) {
|
||||
|
||||
#if defined(ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
TEST(PDPD_Reader_Tests, ImportBasicModelToCoreWstring) {
|
||||
std::string win_dir_path{ PDPD_TEST_MODELS };
|
||||
std::string win_dir_path{ PADDLE_TEST_MODELS };
|
||||
std::replace(win_dir_path.begin(), win_dir_path.end(), '/', '\\');
|
||||
const std::wstring unicode_win_dir_path = FileUtils::multiByteCharToWString(win_dir_path.c_str());
|
||||
auto model = unicode_win_dir_path + L"ひらがな日本語.pdmodel";
|
||||
@@ -944,7 +944,7 @@ mo/main_caffe.py
|
||||
mo/main_kaldi.py
|
||||
mo/main_mxnet.py
|
||||
mo/main_onnx.py
|
||||
mo/main_pdpd.py
|
||||
mo/main_paddle.py
|
||||
mo/main_tf.py
|
||||
mo/middle/__init__.py
|
||||
mo/middle/passes/__init__.py
|
||||
@@ -1090,6 +1090,7 @@ mo_caffe.py
|
||||
mo_kaldi.py
|
||||
mo_mxnet.py
|
||||
mo_onnx.py
|
||||
mo_paddle.py
|
||||
mo_tf.py
|
||||
requirements.txt
|
||||
requirements_caffe.txt
|
||||
|
||||
@@ -11,4 +11,4 @@ from ngraph.frontend import FrontEndManager # pylint: disable=no-name-in-module
|
||||
if __name__ == "__main__":
|
||||
from mo.main import main
|
||||
fem = FrontEndManager()
|
||||
sys.exit(main(get_all_cli_parser(fem), fem, 'pdpd'))
|
||||
sys.exit(main(get_all_cli_parser(fem), fem, 'paddle'))
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
if __name__ == "__main__":
|
||||
from mo.subprocess_main import subprocess_main
|
||||
subprocess_main(framework='pdpd')
|
||||
subprocess_main(framework='paddle')
|
||||
@@ -303,7 +303,7 @@ extern "C" PDPD_API FrontEndVersion GetAPIVersion()
|
||||
extern "C" PDPD_API void* GetFrontEndData()
|
||||
{
|
||||
FrontEndPluginInfo* res = new FrontEndPluginInfo();
|
||||
res->m_name = "pdpd";
|
||||
res->m_name = "paddle";
|
||||
res->m_creator = []() { return std::make_shared<FrontEndPDPD>(); };
|
||||
return res;
|
||||
}
|
||||
@@ -572,9 +572,9 @@ if (NGRAPH_PDPD_FRONTEND_ENABLE)
|
||||
if(paddlepaddle_FOUND)
|
||||
file(GLOB FRONTEND_PDPD_TESTS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/frontend/paddlepaddle/*.cpp)
|
||||
set(SRC ${FRONTEND_PDPD_TESTS_SRC} ${SRC})
|
||||
set(PDPD_TEST_MODELS_DIRNAME pdpd_test_models)
|
||||
set(TEST_PDPD_MODELS ${CMAKE_CURRENT_BINARY_DIR}/${PDPD_TEST_MODELS_DIRNAME}/)
|
||||
add_definitions("-DTEST_PDPD_MODELS_DIRNAME=\"${PDPD_TEST_MODELS_DIRNAME}/\"")
|
||||
set(PADDLE_TEST_MODELS_DIRNAME paddle_test_models)
|
||||
set(TEST_PADDLE_MODELS ${CMAKE_CURRENT_BINARY_DIR}/${PADDLE_TEST_MODELS_DIRNAME}/)
|
||||
add_definitions("-DTEST_PADDLE_MODELS_DIRNAME=\"${PADDLE_TEST_MODELS_DIRNAME}/\"")
|
||||
endif()
|
||||
endif()
|
||||
# ---- End PaddlePaddle FrontEnd testing ------
|
||||
@@ -660,23 +660,23 @@ if (NGRAPH_PDPD_FRONTEND_ENABLE AND paddlepaddle_FOUND)
|
||||
set(OUT_FILES "")
|
||||
foreach(GEN_SCRIPT ${PDPD_GEN_SCRIPTS})
|
||||
get_filename_component(FILE_WE ${GEN_SCRIPT} NAME_WE)
|
||||
set(OUT_DONE_FILE ${TEST_PDPD_MODELS}/${FILE_WE}_done.txt)
|
||||
set(OUT_DONE_FILE ${TEST_PADDLE_MODELS}/${FILE_WE}_done.txt)
|
||||
set(OUT_FILES ${OUT_DONE_FILE} ${OUT_FILES})
|
||||
add_custom_command(OUTPUT ${OUT_DONE_FILE}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/files/paddlepaddle/gen_wrapper.py
|
||||
${GEN_SCRIPT}
|
||||
${TEST_PDPD_MODELS}
|
||||
${TEST_PADDLE_MODELS}
|
||||
${OUT_DONE_FILE}
|
||||
DEPENDS ${GEN_SCRIPT} ${CMAKE_CURRENT_SOURCE_DIR}/files/paddlepaddle/gen_wrapper.py
|
||||
)
|
||||
endforeach()
|
||||
add_custom_target(pdpd_test_models DEPENDS ${OUT_FILES})
|
||||
add_dependencies(unit-test pdpd_test_models)
|
||||
add_custom_target(paddlepaddle_test_models DEPENDS ${OUT_FILES})
|
||||
add_dependencies(unit-test paddlepaddle_test_models)
|
||||
add_dependencies(unit-test paddlepaddle_ngraph_frontend)
|
||||
|
||||
install(DIRECTORY ${TEST_PDPD_MODELS}
|
||||
DESTINATION tests/${PDPD_TEST_MODELS_DIRNAME}
|
||||
install(DIRECTORY ${TEST_PADDLE_MODELS}
|
||||
DESTINATION tests/${PADDLE_TEST_MODELS_DIRNAME}
|
||||
COMPONENT tests
|
||||
EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
@@ -3,12 +3,11 @@
|
||||
//
|
||||
|
||||
#include "basic_api.hpp"
|
||||
#include "paddle_utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
|
||||
static const std::string PDPD = "pdpd";
|
||||
|
||||
using PDPDBasicTest = FrontEndBasicTest;
|
||||
|
||||
static const std::vector<std::string> models{
|
||||
@@ -23,7 +22,7 @@ static const std::vector<std::string> models{
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
PDPDBasicTest,
|
||||
FrontEndBasicTest,
|
||||
::testing::Combine(::testing::Values(PDPD),
|
||||
::testing::Values(std::string(TEST_PDPD_MODELS_DIRNAME)),
|
||||
::testing::Combine(::testing::Values(PADDLE_FE),
|
||||
::testing::Values(std::string(TEST_PADDLE_MODELS_DIRNAME)),
|
||||
::testing::ValuesIn(models)),
|
||||
FrontEndBasicTest::getTestCaseName);
|
||||
@@ -3,19 +3,18 @@
|
||||
//
|
||||
|
||||
#include "cut_specific_model.hpp"
|
||||
#include "paddle_utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
|
||||
static const auto PDPD = "pdpd";
|
||||
|
||||
using PDPDCutTest = FrontEndCutModelTest;
|
||||
|
||||
static CutModelParam getTestData_2in_2out()
|
||||
{
|
||||
CutModelParam res;
|
||||
res.m_frontEndName = PDPD;
|
||||
res.m_modelsPath = std::string(TEST_PDPD_MODELS_DIRNAME);
|
||||
res.m_frontEndName = PADDLE_FE;
|
||||
res.m_modelsPath = std::string(TEST_PADDLE_MODELS_DIRNAME);
|
||||
res.m_modelName = "2in_2out/2in_2out.pdmodel";
|
||||
res.m_oldInputs = {"inputX1", "inputX2"};
|
||||
res.m_newInputs = {"add1.tmp_0"};
|
||||
|
||||
@@ -3,19 +3,18 @@
|
||||
//
|
||||
|
||||
#include "load_from.hpp"
|
||||
#include "paddle_utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
|
||||
static const auto PDPD = "pdpd";
|
||||
|
||||
using PDPDCutTest = FrontEndLoadFromTest;
|
||||
|
||||
static LoadFromFEParam getTestData()
|
||||
{
|
||||
LoadFromFEParam res;
|
||||
res.m_frontEndName = PDPD;
|
||||
res.m_modelsPath = std::string(TEST_PDPD_MODELS_DIRNAME);
|
||||
res.m_frontEndName = PADDLE_FE;
|
||||
res.m_modelsPath = std::string(TEST_PADDLE_MODELS_DIRNAME);
|
||||
res.m_file = "conv2d";
|
||||
res.m_files = {"2in_2out/2in_2out.pdmodel", "2in_2out/2in_2out.pdiparams"};
|
||||
res.m_stream = "relu/relu.pdmodel";
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <cnpy.h>
|
||||
#include "ngraph/ngraph.hpp"
|
||||
#include "op_fuzzy.hpp"
|
||||
#include "paddle_utils.hpp"
|
||||
#include "util/engine/test_engines.hpp"
|
||||
#include "util/test_control.hpp"
|
||||
|
||||
@@ -16,7 +17,6 @@ using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
using TestEngine = test::IE_CPU_Engine;
|
||||
|
||||
static const std::string PDPD = "pdpd";
|
||||
using PDPDFuzzyOpTest = FrontEndFuzzyOpTest;
|
||||
|
||||
static const std::vector<std::string> models{
|
||||
@@ -35,7 +35,7 @@ static const std::vector<std::string> models{
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
PDPDFuzzyOpTest,
|
||||
FrontEndFuzzyOpTest,
|
||||
::testing::Combine(::testing::Values(PDPD),
|
||||
::testing::Values(std::string(TEST_PDPD_MODELS_DIRNAME)),
|
||||
::testing::Combine(::testing::Values(PADDLE_FE),
|
||||
::testing::Values(std::string(TEST_PADDLE_MODELS_DIRNAME)),
|
||||
::testing::ValuesIn(models)),
|
||||
PDPDFuzzyOpTest::getTestCaseName);
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
static const std::string PADDLE_FE = "paddle";
|
||||
@@ -3,12 +3,11 @@
|
||||
//
|
||||
|
||||
#include "partial_shape.hpp"
|
||||
#include "paddle_utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
|
||||
static const auto PDPD = "pdpd";
|
||||
|
||||
using PDPDPartialShapeTest = FrontEndPartialShapeTest;
|
||||
|
||||
static PartShape getTestShape_2in_2out()
|
||||
@@ -61,14 +60,14 @@ static PartShape getTestShape_conv2d_relu()
|
||||
return res;
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(PDPDPartialShapeTest,
|
||||
FrontEndPartialShapeTest,
|
||||
::testing::Combine(::testing::Values(BaseFEParam{
|
||||
PDPD, std::string(TEST_PDPD_MODELS_DIRNAME)}),
|
||||
::testing::ValuesIn(std::vector<PartShape>{
|
||||
getTestShape_2in_2out(),
|
||||
getTestShape_conv2d_relu(),
|
||||
getTestShape_conv2d(),
|
||||
getTestShape_conv2d_setDynamicBatch(),
|
||||
getTestShape_2in_2out_dynbatch()})),
|
||||
FrontEndPartialShapeTest::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
PDPDPartialShapeTest,
|
||||
FrontEndPartialShapeTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(BaseFEParam{PADDLE_FE, std::string(TEST_PADDLE_MODELS_DIRNAME)}),
|
||||
::testing::ValuesIn(std::vector<PartShape>{getTestShape_2in_2out(),
|
||||
getTestShape_conv2d_relu(),
|
||||
getTestShape_conv2d(),
|
||||
getTestShape_conv2d_setDynamicBatch(),
|
||||
getTestShape_2in_2out_dynbatch()})),
|
||||
FrontEndPartialShapeTest::getTestCaseName);
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
#include <frontend/shared/include/utils.hpp>
|
||||
#include <frontend_manager/frontend_manager.hpp>
|
||||
#include <memory>
|
||||
#include "gtest/gtest.h"
|
||||
#include "paddle_utils.hpp"
|
||||
|
||||
using namespace ngraph::frontend;
|
||||
|
||||
const std::string model_file =
|
||||
std::string(TEST_PDPD_MODELS_DIRNAME) + "place_test_model/place_test_model.pdmodel";
|
||||
std::string(TEST_PADDLE_MODELS_DIRNAME) + "place_test_model/place_test_model.pdmodel";
|
||||
|
||||
/***
|
||||
model:
|
||||
@@ -57,7 +57,7 @@ TEST(PDPD_Places, check_tensor_names)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
for (const auto& tensor_name : tensor_names)
|
||||
@@ -71,7 +71,7 @@ TEST(PDPD_Places, check_input_outputs)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
auto inputs = input_model->get_inputs();
|
||||
@@ -106,7 +106,7 @@ TEST(PDPD_Places, check_out_port_of_all_ops)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
for (const auto& tensor_name : tensor_names)
|
||||
@@ -129,7 +129,7 @@ TEST(PDPD_Places, check_in_out_ports_of_model_outputs)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
auto outputs = input_model->get_outputs();
|
||||
@@ -164,7 +164,7 @@ TEST(PDPD_Places, check_source_target_tensors_of_model_outputs)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
auto outputs = input_model->get_outputs();
|
||||
@@ -199,7 +199,7 @@ TEST(PDPD_Places, check_producing_consuming_ops_of_model_outputs)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
auto outputs = input_model->get_outputs();
|
||||
@@ -235,7 +235,7 @@ TEST(PDPD_Places, check_data_flow)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
for (const auto& tensor_name : tensor_names)
|
||||
@@ -276,7 +276,7 @@ TEST(PDPD_Places, check_tensor_to_multiple_ports)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
for (const auto& tensor_name : tensor_names)
|
||||
@@ -308,7 +308,7 @@ TEST(PDPD_Places, check_consuming_ops)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
for (const auto& tensor_name : tensor_names)
|
||||
@@ -353,7 +353,7 @@ TEST(PDPD_Places, check_consuming_ops_2)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
auto it = find(tensor_names.begin(), tensor_names.end(), "lstm_0.tmp_2");
|
||||
@@ -395,7 +395,7 @@ TEST(PDPD_Places, check_producing_ops)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
for (const auto& tensor_name : tensor_names)
|
||||
@@ -419,7 +419,7 @@ TEST(PDPD_Places, check_input_output_ports_dy_idx)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
std::vector<std::string> output_names = {"save_infer_model/scale_0.tmp_1",
|
||||
@@ -446,7 +446,7 @@ TEST(PDPD_Places, check_ops_tensors_by_idx)
|
||||
{
|
||||
FrontEndTestUtils::setupTestEnv();
|
||||
auto m_fem = FrontEndManager();
|
||||
auto frontend = m_fem.load_by_framework("pdpd");
|
||||
auto frontend = m_fem.load_by_framework(PADDLE_FE);
|
||||
auto input_model = frontend->load(FrontEndTestUtils::make_model_path(model_file));
|
||||
|
||||
std::vector<std::string> output_names = {"save_infer_model/scale_0.tmp_1",
|
||||
|
||||
@@ -3,19 +3,18 @@
|
||||
//
|
||||
|
||||
#include "set_element_type.hpp"
|
||||
#include "paddle_utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
|
||||
static const auto PDPD = "pdpd";
|
||||
|
||||
using PDPDCutTest = FrontEndElementTypeTest;
|
||||
|
||||
static SetTypeFEParam getTestData_relu()
|
||||
{
|
||||
SetTypeFEParam res;
|
||||
res.m_frontEndName = PDPD;
|
||||
res.m_modelsPath = std::string(TEST_PDPD_MODELS_DIRNAME);
|
||||
res.m_frontEndName = PADDLE_FE;
|
||||
res.m_modelsPath = std::string(TEST_PADDLE_MODELS_DIRNAME);
|
||||
res.m_modelName = "relu/relu.pdmodel";
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define COUNT_OF(A) (sizeof(A) / sizeof(A[0]))
|
||||
const char split_sequence[] = {'F', 'U', 'Z', 'Z', '_', 'N', 'E', 'X',
|
||||
'T', '_', 'F', 'I', 'E', 'L', 'D'};
|
||||
const char *PDPD = "pdpd";
|
||||
const char *PDPD = "paddle";
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
|
||||
Reference in new issue
Block a user