Skip to content

Commit f7332f4

Browse files
authored
Merge branch 'master' into i2
2 parents 8c4e8f2 + 8eb65f3 commit f7332f4

File tree

34 files changed

+1017
-205
lines changed

34 files changed

+1017
-205
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies = [
2323

2424
[build-system]
2525
requires = [
26-
"setuptools>=77,<=80.9.0",
26+
"setuptools>=77,<=82.0.0",
2727
"wheel<=0.45.1",
2828
"cmake<=4.2.3",
2929
"patchelf<=0.17.2.4; sys_platform == 'linux' and platform_machine == 'x86_64'"

src/bindings/python/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ patchelf<=0.17.2.4
1717
packaging>=22.0
1818

1919
# Frontends
20-
h5py>=3.1.0,<3.16.0
20+
h5py>=3.1.0,<3.17.0
2121
docopt~=0.6.2
2222
paddlepaddle==3.0.0
2323
tensorflow>=1.15.5,<2.21.0

src/common/util/include/openvino/util/mmap_object.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,11 @@ std::shared_ptr<ov::MappedMemory> load_mmap_object(const std::filesystem::path&
6464
* @brief Returns mapped memory for a file from provided file handle (cross-platform).
6565
* Uses mmap on Linux/Unix (with file descriptor) or MapViewOfFile on Windows (with HANDLE).
6666
* This allows external control of file access through a callback function.
67-
* Do not call load_mmap_object_from_handle directly, use the template wrapper instead.
6867
*
6968
* @param handle Platform-specific file handle (int fd on Linux, HANDLE on Windows).
7069
* @param offset Offset in the file where the mapping starts.
7170
* @param size Size of the mapping. If size is std::numeric_limits<size_t>::max(), maps from offset to EOF.
7271
* @return MappedMemory shared ptr object which keep mmaped memory and control the lifetime.
7372
*/
74-
std::shared_ptr<ov::MappedMemory> load_mmap_object_from_handle(FileHandle handle,
75-
size_t offset = 0,
76-
size_t size = auto_size);
77-
78-
template <typename T, std::enable_if_t<std::is_same<T, FileHandle>::value, int> = 0>
79-
std::shared_ptr<ov::MappedMemory> load_mmap_object(T handle, size_t offset = 0, size_t size = auto_size) {
80-
return load_mmap_object_from_handle(static_cast<FileHandle>(handle), offset, size);
81-
}
73+
std::shared_ptr<ov::MappedMemory> load_mmap_object(FileHandle handle, size_t offset = 0, size_t size = auto_size);
8274
} // namespace ov

src/common/util/src/os/lin/lin_mmap_object.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ std::shared_ptr<MappedMemory> load_mmap_object(const std::filesystem::path& path
137137
return holder;
138138
}
139139

140-
std::shared_ptr<ov::MappedMemory> load_mmap_object_from_handle(FileHandle handle, size_t offset, size_t size) {
140+
std::shared_ptr<ov::MappedMemory> load_mmap_object(FileHandle handle, size_t offset, size_t size) {
141141
if (handle == -1) {
142142
throw std::runtime_error("Invalid file descriptor provided for mapping.");
143143
}

src/common/util/src/os/win/win_mmap_object.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ std::shared_ptr<MappedMemory> load_mmap_object(const std::filesystem::path& path
168168
return holder;
169169
}
170170

171-
std::shared_ptr<ov::MappedMemory> load_mmap_object_from_handle(FileHandle handle, size_t offset, size_t size) {
171+
std::shared_ptr<ov::MappedMemory> load_mmap_object(FileHandle handle, size_t offset, size_t size) {
172172
if (handle == INVALID_HANDLE_VALUE || handle == nullptr) {
173173
throw std::runtime_error("Invalid handle provided to load_mmap_object");
174174
}

src/core/tests/mmap_object.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ TEST_P(RangedMappingTest, compare_data) {
157157
} else {
158158
const auto handle_1 = utils::open_ro_file(m_file_path);
159159
const auto handle_2 = utils::open_ro_file(m_file_path);
160-
mm_1 = load_mmap_object_from_handle(handle_1, offset_1, size_1);
161-
mm_2 = load_mmap_object_from_handle(handle_2, offset_2, size_2);
160+
mm_1 = load_mmap_object(handle_1, offset_1, size_1);
161+
mm_2 = load_mmap_object(handle_2, offset_2, size_2);
162162
}
163163
ASSERT_NE(mm_1, nullptr);
164164
ASSERT_NE(mm_2, nullptr);
@@ -187,13 +187,13 @@ TEST_P(RangedMappingTest, compare_id) {
187187
mm_1_ = load_mmap_object(m_file_path, offset_1, size_1);
188188
} else {
189189
const auto handle = utils::open_ro_file(m_file_path);
190-
mm_1 = load_mmap_object_from_handle(handle, offset_1, size_1);
191-
mm_2 = load_mmap_object_from_handle(handle, offset_2, size_2);
190+
mm_1 = load_mmap_object(handle, offset_1, size_1);
191+
mm_2 = load_mmap_object(handle, offset_2, size_2);
192192
const auto other_handle = utils::open_ro_file(other_file_path);
193-
other_mm_1 = load_mmap_object_from_handle(other_handle, offset_1, size_1);
194-
other_mm_2 = load_mmap_object_from_handle(other_handle, offset_2, size_2);
193+
other_mm_1 = load_mmap_object(other_handle, offset_1, size_1);
194+
other_mm_2 = load_mmap_object(other_handle, offset_2, size_2);
195195
const auto handle_ = utils::open_ro_file(m_file_path);
196-
mm_1_ = load_mmap_object_from_handle(handle_, offset_1, size_1);
196+
mm_1_ = load_mmap_object(handle_, offset_1, size_1);
197197
}
198198

199199
ASSERT_NE(mm_1, nullptr);

src/inference/src/dev/core_impl.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -876,16 +876,6 @@ ov::SoPtr<ov::ICompiledModel> ov::CoreImpl::compile_model(const std::shared_ptr<
876876
return ModelCache::compute_hash(model, cache_content.m_model_path, compiled_config);
877877
});
878878
cache_content.model = model;
879-
880-
const auto& cache_mode_it = config.find(cache_mode.name());
881-
if (cache_mode_it != config.end() && cache_mode_it->second == CacheMode::OPTIMIZE_SIZE) {
882-
const auto& rt_info = model->get_rt_info();
883-
auto weights_path = rt_info.find("__weights_path");
884-
if (weights_path != rt_info.end()) {
885-
parsed.m_config[ov::weights_path.name()] = weights_path->second;
886-
}
887-
}
888-
889879
const auto lock = m_cache_guard.get_hash_lock(cache_content.m_blob_id);
890880
compiled_model = load_model_from_cache(cache_content, plugin, parsed.m_config, {}, [&]() {
891881
return compile_model_and_cache(plugin, model, parsed.m_config, {}, cache_content);

src/plugins/intel_npu/src/al/include/intel_npu/config/options.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,4 +1517,18 @@ struct DISABLE_IDLE_MEMORY_PRUNING final : OptionBase<DISABLE_IDLE_MEMORY_PRUNIN
15171517
}
15181518
};
15191519

1520+
struct SHARED_COMMON_QUEUE final : OptionBase<SHARED_COMMON_QUEUE, bool> {
1521+
static std::string_view key() {
1522+
return ov::intel_npu::shared_common_queue.name();
1523+
}
1524+
1525+
static bool defaultValue() {
1526+
return true;
1527+
}
1528+
1529+
static OptionMode mode() {
1530+
return OptionMode::RunTime;
1531+
}
1532+
};
1533+
15201534
} // namespace intel_npu

src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,5 +450,14 @@ static constexpr ov::Property<bool> import_raw_blob{"NPU_IMPORT_RAW_BLOB"};
450450
*/
451451
static constexpr ov::Property<bool> export_raw_blob{"NPU_EXPORT_RAW_BLOB"};
452452

453+
/**
454+
* @brief [Only for NPU Plugin]
455+
* Type: boolean, default is true.
456+
* This option allows to enable/disable the usage of a shared common queue for all compiled models. If set to false,
457+
* each compiled model will have its own common queue. This option is added for enabling the isolation of compiled
458+
* models from each other, which can be required for some use cases.
459+
*/
460+
static constexpr ov::Property<bool> shared_common_queue{"NPU_SHARED_COMMON_QUEUE"};
461+
453462
} // namespace intel_npu
454463
} // namespace ov

src/plugins/intel_npu/src/backend/include/zero_pipeline.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class IPipeline {
6060
*/
6161
size_t _batch_size;
6262

63+
std::shared_ptr<CommandQueue> _command_queue = nullptr;
6364
std::vector<std::unique_ptr<Fence>> _fences;
6465
std::shared_ptr<EventPool> _event_pool;
6566
std::vector<std::shared_ptr<Event>> _events;

0 commit comments

Comments
 (0)