Removed legacy methods SetBatch and SetBlob (#17984)
* Removed legacy methods SetBatch and SetBlob * Fixed GPU plugin build * Remove DYN_BATCH_LIMIT from tests * Revert some changes in GPU plugin
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
||||
void SetBlob(const std::string& name, const InferenceEngine::Blob::Ptr &data) override;
|
||||
void SetBlobs(const std::string& name, const std::vector<InferenceEngine::Blob::Ptr> &data) override;
|
||||
|
||||
void SetBatch(int batch = -1) override;
|
||||
void SetBatch(int batch = -1);
|
||||
std::vector<std::shared_ptr<InferenceEngine::IVariableStateInternal>> QueryState() override;
|
||||
void SetGraph(std::shared_ptr<Graph> graph);
|
||||
void EnableProfiling() { m_useProfiling = true; }
|
||||
@@ -108,6 +108,7 @@ private:
|
||||
std::map<cldnn::primitive_id, cldnn::network_output> internal_outputs;
|
||||
std::vector<std::map<cldnn::primitive_id, cldnn::network_output>> internal_outputs_dynamic;
|
||||
Graph::variable_states_map variables_states_;
|
||||
int m_curBatch = -1;
|
||||
};
|
||||
|
||||
} // namespace intel_gpu
|
||||
|
||||
@@ -52,7 +52,6 @@ static constexpr Property<std::vector<std::string>, PropertyMutability::RW> cust
|
||||
static constexpr Property<ImplForcingMap, PropertyMutability::RW> force_implementations{"GPU_FORCE_IMPLEMENTATIONS"};
|
||||
static constexpr Property<std::string, PropertyMutability::RW> config_file{"CONFIG_FILE"};
|
||||
static constexpr Property<bool, PropertyMutability::RW> enable_lp_transformations{"LP_TRANSFORMS_MODE"};
|
||||
static constexpr Property<bool, PropertyMutability::RW> enable_dynamic_batch{"DYN_BATCH_ENABLED"};
|
||||
static constexpr Property<size_t, PropertyMutability::RW> max_dynamic_batch{"DYN_BATCH_LIMIT"};
|
||||
static constexpr Property<bool, PropertyMutability::RW> exclusive_async_requests{"EXCLUSIVE_ASYNC_REQUESTS"};
|
||||
static constexpr Property<bool, PropertyMutability::RW> nv12_two_inputs{"GPU_NV12_TWO_INPUTS"};
|
||||
|
||||
@@ -346,7 +346,6 @@ InferenceEngine::Parameter CompiledModel::GetMetric(const std::string &name) con
|
||||
CONFIG_KEY(PERFORMANCE_HINT),
|
||||
CONFIG_KEY(PERFORMANCE_HINT_NUM_REQUESTS),
|
||||
CONFIG_KEY(PERF_COUNT),
|
||||
CONFIG_KEY(DYN_BATCH_ENABLED),
|
||||
CONFIG_KEY(CONFIG_FILE),
|
||||
CONFIG_KEY(DEVICE_ID),
|
||||
CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS),
|
||||
|
||||
@@ -1053,7 +1053,7 @@ std::vector<std::shared_ptr<InferenceEngine::IVariableStateInternal>> InferReque
|
||||
std::vector<std::shared_ptr<InferenceEngine::IVariableStateInternal>> ret{};
|
||||
ret.reserve(variables_states_.size());
|
||||
for (const auto& pair : variables_states_)
|
||||
ret.push_back(std::make_shared<VariableState>(pair.first, pair.second, m_graph->get_engine(), m_curBatch));
|
||||
ret.push_back(std::make_shared<VariableState>(pair.first, pair.second, m_graph->get_engine(), -1));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,6 @@ std::vector<std::string> LegacyAPIHelper::get_supported_configs() {
|
||||
CONFIG_KEY(PERFORMANCE_HINT),
|
||||
CONFIG_KEY(PERFORMANCE_HINT_NUM_REQUESTS),
|
||||
CONFIG_KEY(PERF_COUNT),
|
||||
CONFIG_KEY(DYN_BATCH_ENABLED),
|
||||
CONFIG_KEY(CONFIG_FILE),
|
||||
CONFIG_KEY(DEVICE_ID),
|
||||
CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS),
|
||||
|
||||
@@ -170,21 +170,10 @@ Program::Program(InferenceEngine::CNNNetwork& network, cldnn::engine& engine, co
|
||||
bool dyn_shape_batch_found = false;
|
||||
std::map<std::string, ngraph::PartialShape> shapes;
|
||||
std::map<std::string, std::pair<int64_t, int64_t>> batch_dim;
|
||||
auto enable_dynamic_batch = m_config.get_property(ov::intel_gpu::enable_dynamic_batch);
|
||||
if (enable_dynamic_batch) {
|
||||
m_config.set_property(ov::intel_gpu::max_dynamic_batch(network.getBatchSize()));
|
||||
// in case of legacy dynamic batch,
|
||||
// we assume 4D input with 0 batch dim
|
||||
auto param = func->get_parameters().front();
|
||||
auto pname = getParamName(param);
|
||||
shapes[pname] = param->get_output_partial_shape(0);
|
||||
batch_dim[pname].first = 0;
|
||||
batch_dim[pname].second = m_config.get_property(ov::intel_gpu::max_dynamic_batch);
|
||||
} else {
|
||||
dyn_shape_batch_found = IsDynBatchModel(func, shapes, batch_dim);
|
||||
if (dyn_shape_batch_found) {
|
||||
m_config.set_property(ov::intel_gpu::max_dynamic_batch(batch_dim.begin()->second.second));
|
||||
}
|
||||
|
||||
dyn_shape_batch_found = IsDynBatchModel(func, shapes, batch_dim);
|
||||
if (dyn_shape_batch_found) {
|
||||
m_config.set_property(ov::intel_gpu::max_dynamic_batch(batch_dim.begin()->second.second));
|
||||
}
|
||||
|
||||
int m_bv_sz = GetMaxBatchSizeForSingleProgram();
|
||||
|
||||
@@ -54,7 +54,6 @@ void ExecutionConfig::set_default() {
|
||||
std::make_tuple(ov::intel_gpu::enable_loop_unrolling, true),
|
||||
|
||||
// Legacy API properties
|
||||
std::make_tuple(ov::intel_gpu::enable_dynamic_batch, false),
|
||||
std::make_tuple(ov::intel_gpu::exclusive_async_requests, false),
|
||||
std::make_tuple(ov::intel_gpu::nv12_two_inputs, false),
|
||||
std::make_tuple(ov::intel_gpu::config_file, ""),
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
// Copyright (C) 2018-2023 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <behavior/infer_request/dynamic_batch.hpp>
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
namespace ConfigurationTestsDefinitions {
|
||||
namespace {
|
||||
std::vector<size_t> batch_sizes = {
|
||||
16,
|
||||
1,
|
||||
5,
|
||||
9,
|
||||
16
|
||||
};
|
||||
|
||||
auto additional_config = []() {
|
||||
return std::map<std::string, std::string>{};
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_DynamicBatchTest_async, DynamicBatchTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_GPU),
|
||||
::testing::Values(InferenceEngine::Precision::FP32),
|
||||
::testing::Values(batch_sizes),
|
||||
::testing::Values(true),
|
||||
::testing::Values(additional_config())),
|
||||
DynamicBatchTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_DynamicBatchTest_sync, DynamicBatchTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_GPU),
|
||||
::testing::Values(InferenceEngine::Precision::FP32),
|
||||
::testing::Values(batch_sizes),
|
||||
::testing::Values(false),
|
||||
::testing::Values(additional_config())),
|
||||
DynamicBatchTest::getTestCaseName);
|
||||
} // namespace ConfigurationTestsDefinitions
|
||||
@@ -15,21 +15,6 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
|
||||
InferenceEngine::Precision::I64
|
||||
};
|
||||
|
||||
//TODO: Issue : - 28981
|
||||
INSTANTIATE_TEST_SUITE_P(DISABLE_smoke_ReshapeCheckDynBatch, ReshapeLayerTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(true),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(std::vector<size_t>({1, 16, 16, 16})),
|
||||
::testing::Values(std::vector<int64_t>({1, 0, 256})),
|
||||
::testing::Values(CommonTestUtils::DEVICE_GPU),
|
||||
::testing::Values(std::map<std::string, std::string>({{CONFIG_KEY(DYN_BATCH_ENABLED), CONFIG_VALUE(YES)}}))),
|
||||
ReshapeLayerTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_ReshapeCheck, ReshapeLayerTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(true),
|
||||
|
||||
Reference in New Issue
Block a user