Skip to content

Commit

Permalink
[intel-npu] Adding intel-npu python bindings for public properties
Browse files Browse the repository at this point in the history
  • Loading branch information
csoka committed Jan 9, 2025
1 parent 5b42c8d commit f916557
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
16 changes: 16 additions & 0 deletions src/bindings/python/src/pyopenvino/core/properties/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ void regmodule_properties(py::module m) {
wrap_property_RW(m_intel_gpu_hint, ov::intel_gpu::hint::host_task_priority, "host_task_priority");
wrap_property_RW(m_intel_gpu_hint, ov::intel_gpu::hint::available_device_mem, "available_device_mem");

// Submodule intel_npu
py::module m_intel_npu =
m_properties.def_submodule("intel_npu", "openvino.properties.intel_npu submodule that simulates ov::intel_npu");

wrap_property_RO(m_intel_npu, ov::intel_npu::device_alloc_mem_size, "device_alloc_mem_size");
wrap_property_RO(m_intel_npu, ov::intel_npu::device_total_mem_size, "device_total_mem_size");
wrap_property_RO(m_intel_npu, ov::intel_npu::driver_version, "driver_version");

wrap_property_RW(m_intel_npu, ov::intel_npu::compilation_mode_params, "compilation_mode_params");
wrap_property_RW(m_intel_npu, ov::intel_npu::turbo, "turbo");
wrap_property_RW(m_intel_npu, ov::intel_npu::tiles, "tiles");
wrap_property_RW(m_intel_npu, ov::intel_npu::max_tiles, "max_tiles");
wrap_property_RW(m_intel_npu, ov::intel_npu::bypass_umd_caching, "bypass_umd_caching");
wrap_property_RW(m_intel_npu, ov::intel_npu::defer_weights_load, "defer_weights_load");
wrap_property_RW(m_intel_npu, ov::intel_npu::compiler_dynamic_quantization, "compiler_dynamic_quantization");

// Submodule device
py::module m_device =
m_properties.def_submodule("device", "openvino.properties.device submodule that simulates ov::device");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include "openvino/runtime/properties.hpp"
#include "openvino/runtime/auto/properties.hpp"
#include "openvino/runtime/intel_cpu/properties.hpp"
#include "openvino/runtime/intel_gpu/properties.hpp"
#include "openvino/runtime/auto/properties.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
#include "openvino/runtime/properties.hpp"
#include "pyopenvino/core/properties/properties.hpp"

namespace py = pybind11;
Expand Down

0 comments on commit f916557

Please sign in to comment.