auto blob = FuncTestUtils::createAndFillBlob(net.getInputsInfo().begin()->second->getTensorDesc());
- auto ie = InferenceEngine::Core();
- auto exec_net_regular = ie.LoadNetwork(net, CommonTestUtils::DEVICE_GPU);
+ auto ie = PluginCache::get().ie();
+ auto exec_net_regular = ie->LoadNetwork(net, CommonTestUtils::DEVICE_GPU);
// regular inference
auto inf_req_regular = exec_net_regular.CreateInferRequest();
// inference using remote blob
auto ocl_instance = std::make_shared<OpenCL>();
- auto remote_context = make_shared_context(ie, CommonTestUtils::DEVICE_GPU, ocl_instance->_context.get());
- auto exec_net_shared = ie.LoadNetwork(net, remote_context);
+ auto remote_context = make_shared_context(*ie, CommonTestUtils::DEVICE_GPU, ocl_instance->_context.get());
+ auto exec_net_shared = ie->LoadNetwork(net, remote_context);
auto inf_req_shared = exec_net_shared.CreateInferRequest();
inf_req_shared.SetBlob(net.getInputsInfo().begin()->first, fakeImageData);
}
void ExecGraphInputsFusingBinConv::TearDown() {
- if (targetDevice.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) {
- PluginCache::get().reset();
- }
}
TEST_P(ExecGraphInputsFusingBinConv, CheckNumInputsInBinConvFusingWithConv) {
}
void ExecGraphUniqueNodeNames::TearDown() {
- if (targetDevice.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) {
- PluginCache::get().reset();
- }
}
TEST_P(ExecGraphUniqueNodeNames, CheckUniqueNodeNames) {
TEST_P(ConvolutionTransformation, CompareWithRefImpl) {
Run();
-
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- }
};
} // namespace LayerTestsDefinitions
TEST_P(PermuteTransformation, CompareWithRefImpl) {
Run();
-
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- }
};
} // namespace LayerTestsDefinitions
TEST_P(ReshapeTransformation, CompareWithRefImpl) {
Run();
-
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- }
};
} // namespace LayerTestsDefinitions
TEST_P(EqualLayerTest, CompareWithRefs) {
Run();
-
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- }
}
} // namespace LayerTestsDefinitions
TEST_P(GreaterLayerTest, CompareWithRefs) {
Run();
-
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- }
}
} // namespace LayerTestsDefinitions
TEST_P(SelectLayerTest, CompareWithRefImpl) {
Run();
-
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- }
}
} // namespace LayerTestsDefinitions
catch (InferenceEngine::details::InferenceEngineException ex) {
FAIL() << ex.what();
}
-
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- }
};
} // namespace LayerTestsDefinitions
function = std::make_shared<ngraph::Function>(reshape2, input, "reshape_permute_reshape");
}
- TEST_P(ReshapePermuteReshape, CompareWithRefs){
+ TEST_P(ReshapePermuteReshape, CompareWithRefs) {
Run();
- if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) {
- PluginCache::get().reset();
- } };
+ }
} // namespace LayerTestsDefinitions
}
void TearDown() override {
- if ((targetDevice == CommonTestUtils::DEVICE_GPU) || (!configuration.empty())) {
+ if (!configuration.empty()) {
PluginCache::get().reset();
}
function.reset();
}
LayerTestsCommon::~LayerTestsCommon() {
- if (!configuration.empty() || targetDevice.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) {
+ if (!configuration.empty()) {
PluginCache::get().reset();
}
}
outElementsCount, outElementsCount,
FuncTestUtils::CompareType::ABS_AND_REL,
thr1, thr2);
- if (GetParam().deviceName.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) {
- PluginCache::get().reset();
- }
}
std::string getTestCaseName(TestParamInfo<CommonDynBatchFuncTestParams> obj) {
}
void TearDown() override {
- if (_device.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) {
- PluginCache::get().reset();
- }
}
public:
}
void TearDown() override {
- if (deviceName.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) {
- PluginCache::get().reset();
- }
}
-
std::string ConvNet(const int batch, TBlob<uint8_t>::Ptr &weights) {
if (netPrc == Precision::FP32) {
return ConvNetImpl<Precision::FP32>(batch, weights);
}
void TearDown() override {
- if (_device.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) {
- PluginCache::get().reset();
- }
}
template <Precision::ePrecision PRC>
struct device_impl : public refcounted_obj<device_impl> {
public:
explicit device_impl(const cl::Device dev, const cl::Context& ctx, const cl_platform_id platform, const gpu::device_info_internal& info)
- : _device(dev), _context(ctx), _platform(platform), _info(info), _mem_caps(_info.supports_usm, _device) { }
+ : _context(ctx), _device(dev), _platform(platform), _info(info), _mem_caps(_info.supports_usm, _device) { }
gpu::device_info_internal get_info() const { return _info; }
cl::Device get_device() const { return _device; }
~device_impl() = default;
private:
- cl::Device _device;
cl::Context _context;
+ cl::Device _device;
cl_platform_id _platform;
gpu::device_info_internal _info;
memory_capabilities _mem_caps;