forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[intel-npu] Add functional tests to check correct memory deallocation (…
…openvinotoolkit#25980) ### Details: - *The following new test cases are being added:* ``` 1) allocate / de-allocate a model for N times 2) allocate a model create infer request / destroy infer request for N times de-allocate and destroy the model 3) allocate a model create infer request set_tensort(with new buffer every time) for N times destroy infer request de-allocate and destroy the model 4) allocate a model create infer request local_tensor = infer_request.get_output_tensor() destroy infer request // output tensor should not be deallocated here de-allocate and destroy the model destroy local_tensor // output tensor should be deallocated here ``` ### Tickets: - *E129376*
- Loading branch information
1 parent
5f0fc54
commit 69180e2
Showing
8 changed files
with
403 additions
and
294 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
65 changes: 65 additions & 0 deletions
65
src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.cpp
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,65 @@ | ||
// Copyright (C) 2018-2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "overload/ov_plugin/core_integration.hpp" | ||
|
||
using namespace ov::test::behavior; | ||
|
||
namespace { | ||
|
||
const char* NPU_PLUGIN_LIB_NAME = "openvino_intel_npu_plugin"; | ||
|
||
std::vector<std::string> devices = { | ||
std::string(ov::test::utils::DEVICE_NPU), | ||
}; | ||
|
||
std::pair<std::string, std::string> plugins[] = { | ||
std::make_pair(std::string(NPU_PLUGIN_LIB_NAME), std::string(ov::test::utils::DEVICE_NPU)), | ||
}; | ||
|
||
namespace OVClassBasicTestName { | ||
static std::string getTestCaseName(testing::TestParamInfo<std::pair<std::string, std::string>> obj) { | ||
std::ostringstream result; | ||
result << "OVClassBasicTestName_" << obj.param.first << "_" << obj.param.second; | ||
result << "_targetDevice=" << ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::test::utils::DEVICE_NPU); | ||
|
||
return result.str(); | ||
} | ||
} // namespace OVClassBasicTestName | ||
|
||
namespace OVClassNetworkTestName { | ||
static std::string getTestCaseName(testing::TestParamInfo<std::string> obj) { | ||
std::ostringstream result; | ||
result << "OVClassNetworkTestName_" << obj.param; | ||
result << "_targetDevice=" << ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::test::utils::DEVICE_NPU); | ||
|
||
return result.str(); | ||
} | ||
} // namespace OVClassNetworkTestName | ||
|
||
const std::vector<ov::AnyMap> configs = {{}}; | ||
|
||
#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT | ||
INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVClassBasicTestP, | ||
OVClassBasicTestPNPU, | ||
::testing::ValuesIn(plugins), | ||
OVClassBasicTestName::getTestCaseName); | ||
#endif | ||
|
||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_OVClassNetworkTestP, | ||
OVClassNetworkTestPNPU, | ||
::testing::Combine(::testing::ValuesIn(devices), ::testing::ValuesIn(configs)), | ||
OVClassNetworkTestPNPU::getTestCaseName); | ||
|
||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_OVClassLoadNetworkTest, | ||
OVClassLoadNetworkTestNPU, | ||
::testing::Combine(::testing::ValuesIn(devices), ::testing::ValuesIn(configs)), | ||
OVClassLoadNetworkTestNPU::getTestCaseName); | ||
|
||
INSTANTIATE_TEST_SUITE_P(nightly_BehaviorTests_OVClassGetMetricTest, | ||
OVClassGetMetricAndPrintNoThrow, | ||
::testing::Values(ov::test::utils::DEVICE_NPU), | ||
OVClassNetworkTestName::getTestCaseName); | ||
|
||
} // namespace |
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
Oops, something went wrong.