Port fixes from master to LTS (#17324)
* Update ie_common.h (#16860) * [GPU] Added try/catch for device detection loop to skip platforms which throw an exception (#17011) * ONNX FE - model loading fix (#17091) * Path retrieval fix * More detailed messages in the failing test * Exe path with model name --------- Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com> * Upper-bound for patchelf (#17177) * Apply suggestions from code review --------- Co-authored-by: Ian Hunter <ian.hunter@intel.com> Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com> Co-authored-by: Tomasz Dołbniak <tomasz.dolbniak@intel.com> Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com> Co-authored-by: Alina Kladieva <alina.kladieva@intel.com>
This commit is contained in:
parent
8f42bf1647
commit
cb9b50a49d
|
|
@ -1,3 +1,3 @@
|
|||
setuptools>=65.6.1
|
||||
wheel>=0.38.1
|
||||
patchelf; sys_platform == 'linux' and platform_machine == 'x86_64'
|
||||
patchelf<=0.17.2.1; sys_platform == 'linux' and platform_machine == 'x86_64'
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ InputModel::Ptr FrontEnd::load_impl(const std::vector<ov::Any>& variants) const
|
|||
if (variants[0].is<std::istream*>()) {
|
||||
const auto stream = variants[0].as<std::istream*>();
|
||||
if (variants.size() > 1 && variants[1].is<std::string>()) {
|
||||
const auto path = variants[0].as<std::string>();
|
||||
const auto path = variants[1].as<std::string>();
|
||||
return std::make_shared<InputModel>(*stream, path, m_extensions);
|
||||
}
|
||||
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
|
|
|
|||
|
|
@ -25,25 +25,26 @@ static LoadFromFEParam getTestData() {
|
|||
return res;
|
||||
}
|
||||
|
||||
// TODO: 83471
|
||||
TEST_P(FrontEndLoadFromTest, testLoadFromStreamAndPassPath) {
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
const auto path = file_util::path_join(TEST_ONNX_MODELS_DIRNAME, "external_data/external_data.onnx");
|
||||
const auto path = file_util::path_join(CommonTestUtils::getExecutableDirectory(),
|
||||
TEST_ONNX_MODELS_DIRNAME,
|
||||
"external_data/external_data.onnx");
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
std::ifstream ifs(path, std::ios::in | std::ios::binary);
|
||||
ASSERT_TRUE(ifs.is_open());
|
||||
ASSERT_TRUE(ifs.is_open()) << "Could not open an ifstream for the model path: " << path;
|
||||
std::istream* is = &ifs;
|
||||
std::vector<std::string> frontends;
|
||||
FrontEnd::Ptr fe;
|
||||
ASSERT_NO_THROW(frontends = m_fem.get_available_front_ends());
|
||||
ASSERT_NO_THROW(m_frontEnd = m_fem.load_by_model(is));
|
||||
ASSERT_NO_THROW(m_frontEnd = m_fem.load_by_model(is)) << "Could not create the ONNX FE using the istream object";
|
||||
ASSERT_NE(m_frontEnd, nullptr);
|
||||
|
||||
ASSERT_NO_THROW(m_inputModel = m_frontEnd->load(is, path));
|
||||
ASSERT_NO_THROW(m_inputModel = m_frontEnd->load(is, path)) << "Could not load the model";
|
||||
ASSERT_NE(m_inputModel, nullptr);
|
||||
|
||||
std::shared_ptr<ngraph::Function> function;
|
||||
ASSERT_NO_THROW(function = m_frontEnd->convert(m_inputModel));
|
||||
ASSERT_NO_THROW(function = m_frontEnd->convert(m_inputModel)) << "Could not convert the model to OV representation";
|
||||
ASSERT_NE(function, nullptr);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,5 +2,3 @@
|
|||
ONNXLoadTest/FrontEndLoadFromTest.testLoadFromTwoFiles/onnx
|
||||
ONNXLoadTest/FrontEndLoadFromTest.testLoadFromTwoStreams/onnx
|
||||
|
||||
# exception: invalid external data: ExternalDataInfo
|
||||
ONNXLoadTest/FrontEndLoadFromTest.testLoadFromStreamAndPassPath/onnx
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ enum Layout : uint8_t {
|
|||
NDHWC = 4, //!< NDHWC layout for input / output blobs
|
||||
|
||||
// weight layouts
|
||||
OIHW = 64, //!< NDHWC layout for operation weights
|
||||
GOIHW = 65, //!< NDHWC layout for operation weights
|
||||
OIDHW = 66, //!< NDHWC layout for operation weights
|
||||
GOIDHW = 67, //!< NDHWC layout for operation weights
|
||||
OIHW = 64, //!< OIHW layout for operation weights
|
||||
GOIHW = 65, //!< GOIHW layout for operation weights
|
||||
OIDHW = 66, //!< OIDHW layout for operation weights
|
||||
GOIDHW = 67, //!< GOIDHW layout for operation weights
|
||||
|
||||
// Scalar
|
||||
SCALAR = 95, //!< A scalar layout
|
||||
|
|
|
|||
|
|
@ -201,12 +201,16 @@ std::vector<device::ptr> ocl_device_detector::create_device_list() const {
|
|||
for (auto& id : platform_ids) {
|
||||
cl::Platform platform = cl::Platform(id);
|
||||
|
||||
std::vector<cl::Device> devices;
|
||||
platform.getDevices(CL_DEVICE_TYPE_ALL, &devices);
|
||||
for (auto& device : devices) {
|
||||
if (!does_device_match_config(device))
|
||||
continue;
|
||||
supported_devices.emplace_back(std::make_shared<ocl_device>(device, cl::Context(device), id));
|
||||
try {
|
||||
std::vector<cl::Device> devices;
|
||||
platform.getDevices(CL_DEVICE_TYPE_ALL, &devices);
|
||||
for (auto& device : devices) {
|
||||
if (!does_device_match_config(device))
|
||||
continue;
|
||||
supported_devices.emplace_back(std::make_shared<ocl_device>(device, cl::Context(device), id));
|
||||
}
|
||||
} catch (std::exception& ex) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
OPENVINO_ASSERT(!supported_devices.empty(), create_device_error_msg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue