-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor shared beh tests to API 2.0
- Loading branch information
Showing
10 changed files
with
789 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/tests/functional/plugin/shared/include/behavior/ov_plugin/hetero_synthetic.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include <tuple> | ||
#include <string> | ||
#include <vector> | ||
#include <unordered_set> | ||
|
||
#include "shared_test_classes/base/ov_subgraph.hpp" | ||
#include "ov_models/utils/ov_helpers.hpp" | ||
|
||
namespace ov { | ||
namespace test { | ||
namespace behavior { | ||
|
||
struct PluginParameter { | ||
std::string _name; | ||
std::string _location; | ||
}; | ||
|
||
struct FunctionParameter { | ||
std::unordered_set<std::string> _majorPluginNodeIds; | ||
std::shared_ptr<ov::Model> _function; | ||
bool _dynamic_batch; | ||
uint32_t _seed; | ||
}; | ||
|
||
using OVHeteroSyntheticTestParameters = std::tuple< | ||
std::vector<PluginParameter>, | ||
FunctionParameter | ||
>; | ||
|
||
class OVHeteroSyntheticTest : public testing::WithParamInterface<OVHeteroSyntheticTestParameters>, | ||
virtual public ov::test::SubgraphBaseStaticTest { | ||
protected: | ||
enum {Plugin, Function}; | ||
|
||
~OVHeteroSyntheticTest() override = default; | ||
void SetUp() override; | ||
void TearDown() override; | ||
|
||
std::string SetUpAffinity(); | ||
|
||
std::vector<std::string> _registredPlugins; | ||
|
||
public: | ||
static std::string getTestCaseName(const ::testing::TestParamInfo<OVHeteroSyntheticTestParameters>& obj); | ||
|
||
static std::vector<FunctionParameter> singleMajorNodeFunctions( | ||
const std::vector<std::function<std::shared_ptr<ov::Model>()>>& builders, bool dynamic_batch = false); | ||
|
||
static std::vector<FunctionParameter> randomMajorNodeFunctions( | ||
const std::vector<std::function<std::shared_ptr<ov::Model>()>>& builders, bool dynamic_batch = false, uint32_t seed = 0); | ||
|
||
static std::vector<FunctionParameter> _singleMajorNodeFunctions; | ||
static std::vector<FunctionParameter> _randomMajorNodeFunctions; | ||
}; | ||
|
||
} // namespace behavior | ||
} // namespace test | ||
} // namespace ov |
Oops, something went wrong.