Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[NPU] Remove dKmb support from the plugin (#26079)

Bogdan Pereanud9d1903ea0aa
diff --git a/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp b/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp
index 35d03dd6488..0c5a04ce0c0 100644
--- a/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp
+++ b/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp
@@ -12,8 +12,8 @@ namespace intel_npu {
namespace Platform {
constexpr std::string_view AUTO_DETECT = "AUTO_DETECT"; // Auto detection
-constexpr std::string_view NPU3700 = "3700"; // NPU30XX
-constexpr std::string_view NPU3720 = "3720"; // NPU37XX
+constexpr std::string_view NPU3720 = "3720"; // NPU3720
+constexpr std::string_view NPU4000 = "4000"; // NPU4000
/**
* @brief Converts the given platform value to the standard one.
diff --git a/src/plugins/intel_npu/src/backend/include/zero_executor.hpp b/src/plugins/intel_npu/src/backend/include/zero_executor.hpp
index 10b5c66233f..4cbe03bcc7a 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_executor.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_executor.hpp
@@ -47,7 +47,7 @@ public:
inline const std::shared_ptr<const NetworkDescription>& getNetworkDesc() const {
return _networkDesc;
}
- inline const std::array<std::shared_ptr<CommandQueue>, stage::COUNT>& getCommandQueue() const {
+ inline const std::shared_ptr<CommandQueue>& getCommandQueue() const {
return _command_queues;
}
inline const uint32_t& get_group_ordinal() const {
@@ -77,7 +77,7 @@ private:
std::vector<ArgumentDescriptor> _input_descriptors;
std::vector<ArgumentDescriptor> _output_descriptors;
- std::array<std::shared_ptr<CommandQueue>, stage::COUNT> _command_queues;
+ std::shared_ptr<CommandQueue> _command_queues;
mutable std::mutex _mutex;
};
diff --git a/src/plugins/intel_npu/src/backend/include/zero_memory.hpp b/src/plugins/intel_npu/src/backend/include/zero_memory.hpp
index a0110c3c74e..6ecbde0d546 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_memory.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_memory.hpp
@@ -21,41 +21,6 @@ constexpr std::size_t STANDARD_PAGE_SIZE = 4096;
namespace intel_npu {
namespace zeroMemory {
-struct DeviceMem {
- DeviceMem() = delete;
- DeviceMem(const ze_device_handle_t device_handle, const ze_context_handle_t context, const std::size_t size);
- DeviceMem(const DeviceMem&) = delete;
- DeviceMem(DeviceMem&& other)
- : _size(other._size),
- _data(other._data),
- _context(other._context),
- _log("DeviceMem", Logger::global().level()) {
- other._size = 0;
- other._data = nullptr;
- }
- DeviceMem& operator=(const DeviceMem&) = delete;
- DeviceMem& operator=(DeviceMem&& other);
-
- const void* data() const {
- return _data;
- }
- void* data() {
- return _data;
- }
- std::size_t size() const {
- return _size;
- }
- void free();
- ~DeviceMem();
-
-private:
- std::size_t _size = 0;
- void* _data = nullptr;
- ze_context_handle_t _context = nullptr;
- static const std::size_t _alignment = STANDARD_PAGE_SIZE;
-
- Logger _log;
-};
// Create an allocator that uses the ov::Allocator signature that will be used to create the tensor.
class HostMemAllocator final {
@@ -88,34 +53,5 @@ private:
static const std::size_t _alignment = STANDARD_PAGE_SIZE;
};
-// Graph arguments (inputs and outputs) need to be allocated in the host memory.
-// For discrete platforms, graph arguments need to be copied into the device memory.
-// MemoryMangementUnit is used to allocate memory in the device memory.
-// Usage: we should append graph arguments with corresponding names with `appendArgument` call to prepare size
-// statistics and lookup table. To commit memory allocation we should call `allocate`
-struct MemoryManagementUnit {
- MemoryManagementUnit() = default;
-
- void appendArgument(const std::size_t argSize);
-
- void allocate(const ze_device_handle_t device_handle, const ze_context_handle_t context);
-
- std::size_t getSize() const;
- const void* getDeviceMemRegion() const;
- void* getDeviceMemRegion();
-
- void* getDevicePtr(const size_t index);
-
- bool checkHostPtr(const void* ptr) const;
-
-private:
- std::size_t _size = 0;
-
- std::unique_ptr<DeviceMem> _device;
- std::vector<std::size_t> _offsets;
-
- static const std::size_t alignment = STANDARD_PAGE_SIZE;
-};
-
} // namespace zeroMemory
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/backend/include/zero_pipeline.hpp b/src/plugins/intel_npu/src/backend/include/zero_pipeline.hpp
index ad946579f11..6a5cc79ed7a 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_pipeline.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_pipeline.hpp
@@ -20,30 +20,36 @@ struct TensorData {
struct Pipeline {
public:
- Pipeline() = default;
+ Pipeline(const Config& config,
+ const std::shared_ptr<const IExecutor>& executorPtr,
+ zeroProfiling::ProfilingPool& profiling_pool,
+ zeroProfiling::ProfilingQuery& profiling_query,
+ std::shared_ptr<zeroProfiling::NpuInferProfiling> npu_profiling,
+ const std::vector<std::optional<TensorData>>& inputTensorsData,
+ const std::vector<std::optional<TensorData>>& outputTensorsData,
+ const size_t numberOfCommandLists);
+
Pipeline(const Pipeline&) = delete;
- Pipeline(Pipeline&&) = delete;
Pipeline& operator=(const Pipeline&) = delete;
- Pipeline& operator=(Pipeline&&) = delete;
virtual ~Pipeline() = default;
- virtual void push() = 0;
- virtual void pull() = 0;
- virtual void reset() const = 0;
+ void push();
+ void pull();
+ void reset() const;
- virtual void updateCommandList(const TensorData& tensorsData, const uint32_t index) = 0;
+ void updateCommandList(const TensorData& tensorsData, const uint32_t index);
protected:
- zeroMemory::MemoryManagementUnit _deviceInputs;
- zeroMemory::MemoryManagementUnit _deviceOutputs;
+ const Config _config;
+ const ZeroExecutor* _executor;
+ CommandQueue& _command_queue;
+ std::vector<std::unique_ptr<CommandList>> _command_lists;
+ std::vector<std::unique_ptr<Fence>> _fences;
+ EventPool _event_pool;
+ std::vector<std::unique_ptr<Event>> _events;
+ bool sync_output_with_fences_ = true;
+ std::shared_ptr<zeroProfiling::NpuInferProfiling> _npu_profiling;
+ Logger _logger;
};
-std::unique_ptr<Pipeline> makePipeline(const std::shared_ptr<const IExecutor>& executorPtr,
- const Config& config,
- zeroProfiling::ProfilingPool& profiling_pool,
- zeroProfiling::ProfilingQuery& profiling_query,
- std::shared_ptr<zeroProfiling::NpuInferProfiling> npu_profiling,
- const std::vector<std::optional<TensorData>>& inputTensorsData,
- const std::vector<std::optional<TensorData>>& outputTensorsData,
- const size_t numberOfCommandLists);
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/backend/src/zero_device.cpp b/src/plugins/intel_npu/src/backend/src/zero_device.cpp
index 595ce734b53..316fd4ab192 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_device.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_device.cpp
@@ -96,25 +96,21 @@ std::shared_ptr<IExecutor> ZeroDevice::createExecutor(
std::string ZeroDevice::getName() const {
// KMD is setting usDeviceID from VpuFamilyID.h
-#define NPU_3700_DEVICE_ID 0x6240
#define NPU_3720_P_DEVICE_ID 0x7D1D
#define NPU_3720_S_DEVICE_ID 0xAD1D
#define NPU_4000_DEVICE_ID 0x643E
std::string name;
switch (device_properties.deviceId) {
- case NPU_3700_DEVICE_ID:
- name = "3700";
- break;
case NPU_3720_P_DEVICE_ID:
case NPU_3720_S_DEVICE_ID:
name = ov::intel_npu::Platform::NPU3720;
break;
case NPU_4000_DEVICE_ID:
- name = "4000";
+ name = ov::intel_npu::Platform::NPU4000;
break;
default:
- name = "AUTO_DETECT";
+ name = ov::intel_npu::Platform::AUTO_DETECT;
}
return name;
@@ -170,11 +166,7 @@ std::map<ov::element::Type, float> ZeroDevice::getGops() const {
}
ov::device::Type ZeroDevice::getDeviceType() const {
- if (device_properties.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED) {
- return ov::device::Type::INTEGRATED;
- } else {
- return ov::device::Type::DISCRETE;
- }
+ return ov::device::Type::INTEGRATED;
}
std::shared_ptr<SyncInferRequest> ZeroDevice::createInferRequest(
diff --git a/src/plugins/intel_npu/src/backend/src/zero_executor.cpp b/src/plugins/intel_npu/src/backend/src/zero_executor.cpp
index 69603b18c04..4abaa361960 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_executor.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_executor.cpp
@@ -31,41 +31,30 @@ ZeroExecutor::ZeroExecutor(const std::shared_ptr<const ZeroInitStructsHolder>& i
_networkDesc(networkDescription),
_graph_ddi_table_ext(_initStructs->getGraphDdiTable()),
_group_ordinal(group_ordinal),
- _command_queues{{std::make_shared<CommandQueue>(_initStructs->getDevice(),
- _initStructs->getContext(),
- zeroUtils::toZeQueuePriority(_config.get<MODEL_PRIORITY>()),
- _initStructs->getCommandQueueDdiTable(),
- _config,
- group_ordinal),
- std::make_shared<CommandQueue>(_initStructs->getDevice(),
- _initStructs->getContext(),
- zeroUtils::toZeQueuePriority(_config.get<MODEL_PRIORITY>()),
- _initStructs->getCommandQueueDdiTable(),
- _config,
- group_ordinal),
- std::make_shared<CommandQueue>(_initStructs->getDevice(),
- _initStructs->getContext(),
- zeroUtils::toZeQueuePriority(_config.get<MODEL_PRIORITY>()),
- _initStructs->getCommandQueueDdiTable(),
- _config,
- group_ordinal)}} {
- _logger.debug("create graph_command_list");
+ _command_queues{std::make_shared<CommandQueue>(_initStructs->getDevice(),
+ _initStructs->getContext(),
+ zeroUtils::toZeQueuePriority(_config.get<MODEL_PRIORITY>()),
+ _initStructs->getCommandQueueDdiTable(),
+ _config,
+ group_ordinal)} {
+ _logger.debug("ZeroExecutor::ZeroExecutor init start - create graph_command_list");
OV_ITT_SCOPED_TASK(itt::domains::LevelZeroBackend, "Executor::ZeroExecutor");
CommandList graph_command_list(_initStructs->getDevice(),
_initStructs->getContext(),
_initStructs->getGraphDdiTable(),
_config,
_group_ordinal);
- _logger.debug("create graph_command_queue");
+ _logger.debug("ZeroExecutor::ZeroExecutor - create graph_command_queue");
CommandQueue graph_command_queue(_initStructs->getDevice(),
_initStructs->getContext(),
ZE_COMMAND_QUEUE_PRIORITY_NORMAL,
_initStructs->getCommandQueueDdiTable(),
_config,
_group_ordinal);
- _logger.debug("create fence");
+ _logger.debug("ZeroExecutor::ZeroExecutor - create fence");
Fence fence(graph_command_queue, _config);
+ _logger.debug("ZeroExecutor::ZeroExecutor - create graph");
OV_ITT_TASK_CHAIN(ZERO_EXECUTOR_GRAPH, itt::domains::LevelZeroBackend, "Executor::ZeroExecutor", "graphCreate");
// _graph is a nullptr for CIP path, a new handle will be obtained from the driver based on the given
@@ -112,17 +101,17 @@ ZeroExecutor::ZeroExecutor(const std::shared_ptr<const ZeroInitStructsHolder>& i
}
OV_ITT_TASK_NEXT(ZERO_EXECUTOR_GRAPH, "appendGraphInitialize");
- _logger.debug("performing appendGraphInitialize");
+ _logger.debug("ZeroExecutor::ZeroExecutor - performing appendGraphInitialize");
graph_command_list.appendGraphInitialize(_graph);
- _logger.debug("closing graph command list");
+ _logger.debug("ZeroExecutor::ZeroExecutor - closing graph command list");
graph_command_list.close();
OV_ITT_TASK_NEXT(ZERO_EXECUTOR_GRAPH, "queue_execute");
- _logger.debug("performing executeCommandList");
+ _logger.debug("ZeroExecutor::ZeroExecutor - performing executeCommandList");
graph_command_queue.executeCommandList(graph_command_list, fence);
- _logger.debug("performing hostSynchronize");
+ _logger.debug("ZeroExecutor::ZeroExecutor - performing hostSynchronize");
fence.hostSynchronize();
- _logger.debug("hostSynchronize completed");
+ _logger.debug("ZeroExecutor::ZeroExecutor - hostSynchronize completed");
if (config.has<WORKLOAD_TYPE>()) {
setWorkloadType(config.get<WORKLOAD_TYPE>());
@@ -142,9 +131,7 @@ void ZeroExecutor::setWorkloadType(const ov::WorkloadType workloadType) const {
OPENVINO_THROW("Unknown value for WorkloadType!");
}
- for (auto& queue : _command_queues) {
- queue->setWorkloadType(zeWorkloadType);
- }
+ _command_queues->setWorkloadType(zeWorkloadType);
}
void ZeroExecutor::setArgumentValue(uint32_t argi_, const void* argv_) const {
diff --git a/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp b/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
index d80dc33a677..ec17b0e137c 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
@@ -176,10 +176,7 @@ ZeroInferRequest::ZeroInferRequest(const std::shared_ptr<ZeroInitStructsHolder>&
_outputAllocator = std::make_shared<const zeroMemory::HostMemAllocator>(_initStructs);
_inputAllocator =
- (_properties.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED)
- ? std::make_shared<const zeroMemory::HostMemAllocator>(_initStructs,
- ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED)
- : _outputAllocator;
+ std::make_shared<const zeroMemory::HostMemAllocator>(_initStructs, ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED);
if (config.get<BATCH_MODE>() != ov::intel_npu::BatchMode::COMPILER) {
_batchSize = getBatchSize(_metadata);
@@ -260,14 +257,16 @@ void ZeroInferRequest::create_pipeline() {
_logger.debug("ZeroInferRequest::create_pipeline - constructing pipeline");
// Construct pipeline
- _pipeline = makePipeline(_executorPtr,
- _config,
- _profilingPool,
- _profilingQuery,
- _npuProfiling,
- _inputTensorsData,
- _outputTensorsData,
- _numberOfCommandLists);
+
+ _pipeline = std::make_unique<Pipeline>(_config,
+ _executorPtr,
+ _profilingPool,
+ _profilingQuery,
+ _npuProfiling,
+ _inputTensorsData,
+ _outputTensorsData,
+ _numberOfCommandLists);
+
_logger.debug("ZeroInferRequest::create_pipeline - SyncInferRequest completed");
}
diff --git a/src/plugins/intel_npu/src/backend/src/zero_memory.cpp b/src/plugins/intel_npu/src/backend/src/zero_memory.cpp
index 79a5efab5ee..2faa22503eb 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_memory.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_memory.cpp
@@ -9,40 +9,6 @@
namespace intel_npu {
namespace zeroMemory {
-DeviceMem::DeviceMem(const ze_device_handle_t device_handle, ze_context_handle_t context, const std::size_t size)
- : _size(size),
- _context(context),
- _log("DeviceMem", Logger::global().level()) {
- ze_device_mem_alloc_desc_t desc = {ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC, nullptr, 0, 0};
-
- zeroUtils::throwOnFail("zeMemAllocDevice",
- zeMemAllocDevice(_context, &desc, _size, _alignment, device_handle, &_data));
-}
-DeviceMem& DeviceMem::operator=(DeviceMem&& other) {
- if (this == &other)
- return *this;
- free();
- _size = other._size;
- _data = other._data;
- _context = other._context;
- other._size = 0;
- other._data = nullptr;
- return *this;
-}
-void DeviceMem::free() {
- if (_size != 0) {
- _size = 0;
- zeroUtils::throwOnFail("zeMemFree DeviceMem", zeMemFree(_context, _data));
- _data = nullptr;
- }
-}
-DeviceMem::~DeviceMem() {
- try {
- free();
- } catch (const std::exception& e) {
- _log.error("Caught when freeing memory: %s", e.what());
- }
-}
void* HostMemAllocator::allocate(const size_t bytes, const size_t /*alignment*/) noexcept {
size_t size = bytes + _alignment - (bytes % _alignment);
@@ -71,39 +37,5 @@ bool HostMemAllocator::is_equal(const HostMemAllocator& other) const {
return (_initStructs == other._initStructs) && (_flag == other._flag);
}
-void MemoryManagementUnit::appendArgument(const std::size_t argSize) {
- _offsets.push_back(_size);
-
- _size += argSize + alignment -
- (argSize % alignment); // is this really necessary? if 0==argSize%alignment -> add 1 * alignment
-}
-
-void MemoryManagementUnit::allocate(const ze_device_handle_t device_handle, const ze_context_handle_t context) {
- if (_size == 0) {
- OPENVINO_THROW("Can't allocate empty buffer");
- }
-
- _device = std::make_unique<DeviceMem>(device_handle, context, _size);
-}
-std::size_t MemoryManagementUnit::getSize() const {
- return _size;
-}
-const void* MemoryManagementUnit::getDeviceMemRegion() const {
- return _device ? _device->data() : nullptr;
-}
-void* MemoryManagementUnit::getDeviceMemRegion() {
- return _device ? _device->data() : nullptr;
-}
-void* MemoryManagementUnit::getDevicePtr(const size_t index) {
- uint8_t* from = static_cast<uint8_t*>(_device ? _device->data() : nullptr);
- OPENVINO_ASSERT(from != nullptr, "Device memory not allocated yet");
- OPENVINO_ASSERT(index < _offsets.size(),
- "Memory offset index out of bound. Received: ",
- index,
- ", memory offset size: ",
- _offsets.size());
-
- return _offsets.at(index) + from;
-}
} // namespace zeroMemory
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp
index 77d325420ac..ff24536a52d 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp
@@ -15,364 +15,145 @@
namespace intel_npu {
-struct DiscretePipeline final : public Pipeline {
-public:
- DiscretePipeline(const Config& config,
- const ze_device_handle_t& device_handle,
- ze_context_handle_t& context,
- ze_graph_dditable_ext_curr_t* graph_ddi_table_ext,
- const std::shared_ptr<const IExecutor>& executorPtr,
- ze_graph_profiling_query_handle_t profiling_handle,
- const std::array<std::shared_ptr<CommandQueue>, stage::COUNT>& command_queues,
- const uint32_t& group_ordinal,
- const std::vector<std::optional<TensorData>>& inputTensorsData,
- const std::vector<std::optional<TensorData>>& outputTensorsData)
- : _config(config),
- _command_queues{command_queues},
- _command_list{{{device_handle, context, graph_ddi_table_ext, _config, group_ordinal},
- {device_handle, context, graph_ddi_table_ext, _config, group_ordinal},
- {device_handle, context, graph_ddi_table_ext, _config, group_ordinal}}},
- _fence{{{*_command_queues[stage::UPLOAD], _config},
- {*_command_queues[stage::EXECUTE], _config},
- {*_command_queues[stage::READBACK], _config}}},
- _event_pool(device_handle, context, stage::COUNT, _config),
- _event{{{_event_pool.handle(), stage::UPLOAD, _config},
- {_event_pool.handle(), stage::EXECUTE, _config},
- {_event_pool.handle(), stage::READBACK, _config}}},
- _logger("DiscretePipeline", _config.get<LOG_LEVEL>()) {
- _logger.debug("DiscretePipeline - initialize started");
- const ZeroExecutor* executor = static_cast<const ZeroExecutor*>(executorPtr.get());
- static const std::size_t alignment = STANDARD_PAGE_SIZE;
-
- OV_ITT_SCOPED_TASK(itt::domains::LevelZeroBackend, "Zero_infer_request::DiscretePipeline::DiscretePipeline");
- for (const auto& desc : executor->get_input_descriptors()) {
- _deviceInputs.appendArgument(zeroUtils::getSizeIOBytes(desc.info));
- }
- _deviceInputs.allocate(device_handle, context);
-
- _logger.debug("DiscretePipeline - appending memory copy and set argument value for input");
-
- size_t inputIndex = 0;
- for (const auto& desc : executor->get_input_descriptors()) {
- const void* tensorBuffer = reinterpret_cast<const void*>(inputTensorsData.at(inputIndex)->mem);
-
- const std::size_t argSize = zeroUtils::getSizeIOBytes(desc.info);
- std::size_t size = argSize + alignment - (argSize % alignment);
-
- _command_list[stage::UPLOAD].appendMemoryCopy(_deviceInputs.getDevicePtr(inputIndex), tensorBuffer, size);
-
- executor->setArgumentValue(desc.idx, _deviceInputs.getDevicePtr(inputIndex));
- ++inputIndex;
- }
-
- _logger.debug("DiscretePipeline - append signal event");
-
- _command_list[stage::UPLOAD].appendBarrier();
- _event[stage::UPLOAD].AppendSignalEvent(_command_list[stage::UPLOAD]);
-
- for (const auto& desc : executor->get_output_descriptors()) {
- _deviceOutputs.appendArgument(zeroUtils::getSizeIOBytes(desc.info));
- }
- _deviceOutputs.allocate(device_handle, context);
-
- _logger.debug("DiscretePipeline - appending memory copy and set argument value for output");
-
- size_t outputIndex = 0;
- for (const auto& desc : executor->get_output_descriptors()) {
- void* tensorBuffer = reinterpret_cast<void*>(outputTensorsData.at(outputIndex)->mem);
-
- const std::size_t argSize = zeroUtils::getSizeIOBytes(desc.info);
- std::size_t size = argSize + alignment - (argSize % alignment);
+Pipeline::Pipeline(const Config& config,
+ const std::shared_ptr<const IExecutor>& executorPtr,
+ zeroProfiling::ProfilingPool& profiling_pool,
+ zeroProfiling::ProfilingQuery& profiling_query,
+ std::shared_ptr<zeroProfiling::NpuInferProfiling> npu_profiling,
+ const std::vector<std::optional<TensorData>>& inputTensorsData,
+ const std::vector<std::optional<TensorData>>& outputTensorsData,
+ const size_t numberOfCommandLists)
+ : _config(config),
+ _executor(static_cast<const ZeroExecutor*>(executorPtr.get())),
+ _command_queue(*_executor->getCommandQueue()),
+ _event_pool{_executor->getInitStructs()->getDevice(),
+ _executor->getInitStructs()->getContext(),
+ numberOfCommandLists ? static_cast<uint32_t>(numberOfCommandLists) : 1,
+ _config},
+ _npu_profiling(std::move(npu_profiling)),
+ _logger("IntegratedPipeline", _config.get<LOG_LEVEL>()) {
+ OV_ITT_SCOPED_TASK(itt::domains::LevelZeroBackend, "Zero_infer_request::IntegratedPipeline::IntegratedPipeline");
+ _logger.debug("IntegratedPipeline - initialize started");
+
+ if (profiling_pool.create()) {
+ profiling_query.create(profiling_pool._handle);
+ }
- _command_list[stage::READBACK].appendMemoryCopy(tensorBuffer,
- _deviceOutputs.getDevicePtr(outputIndex),
- size);
+ _command_lists.reserve(numberOfCommandLists);
+ _events.reserve(numberOfCommandLists);
+ _fences.reserve(numberOfCommandLists);
+ _logger.debug("IntegratedPipeline - emplace_back _event_pool and _command_queue");
+ for (size_t i = 0; i < numberOfCommandLists; i++) {
+ _command_lists.emplace_back(
+ std::make_unique<CommandList>(_executor->getInitStructs()->getDevice(),
+ _executor->getInitStructs()->getContext(),
+ _executor->getInitStructs()->getGraphDdiTable(),
+ _config,
+ _executor->get_group_ordinal(),
+ _executor->getInitStructs()->getMutableCommandListVersion() ? true : false));
+ _events.emplace_back(std::make_unique<Event>(_event_pool.handle(), static_cast<uint32_t>(i), _config));
+ _fences.emplace_back(std::make_unique<Fence>(_command_queue, _config));
+ }
- executor->setArgumentValue(desc.idx, _deviceOutputs.getDevicePtr(outputIndex));
- ++outputIndex;
+ for (size_t i = 0; i < numberOfCommandLists; i++) {
+ size_t ioIndex = 0;
+ for (const auto& desc : _executor->get_input_descriptors()) {
+ _executor->setArgumentValue(desc.idx,
+ static_cast<unsigned char*>(inputTensorsData.at(ioIndex)->mem) +
+ (i * inputTensorsData.at(ioIndex)->size) / numberOfCommandLists);
+ ++ioIndex;
}
- _event[stage::UPLOAD].AppendWaitOnEvent(_command_list[stage::EXECUTE]);
- _logger.debug("DiscretePipeline - appendGraphExecute");
- _command_list[stage::EXECUTE].appendGraphExecute(executor->graph(), profiling_handle);
- _logger.debug("DiscretePipeline - appendEventReset");
- _event[stage::UPLOAD].AppendEventReset(_command_list[stage::READBACK]);
-
- for (auto& commandList : _command_list) {
- commandList.close();
+ ioIndex = 0;
+ for (const auto& desc : _executor->get_output_descriptors()) {
+ _executor->setArgumentValue(desc.idx,
+ static_cast<unsigned char*>(outputTensorsData.at(ioIndex)->mem) +
+ (i * outputTensorsData.at(ioIndex)->size) / numberOfCommandLists);
+ ++ioIndex;
}
- _logger.debug("DiscretePipeline - initialize completed");
- };
-
- DiscretePipeline(const DiscretePipeline&) = delete;
- DiscretePipeline& operator=(const DiscretePipeline&) = delete;
- virtual ~DiscretePipeline() = default;
-
- void push() override {
- _logger.debug("DiscretePipeline - push() started");
- OV_ITT_TASK_CHAIN(ZERO_INFER_REQUEST_DP_PUSH,
- itt::domains::LevelZeroBackend,
- "DiscretePipeline::push",
- "UPLOAD");
- // Dispatch command to copy input data from upload heap to default heap
- _command_queues[stage::UPLOAD]->executeCommandList(_command_list[stage::UPLOAD]);
- OV_ITT_TASK_NEXT(ZERO_INFER_REQUEST_DP_PUSH, "EXECUTE");
- // Submit the command list for execute
- _command_queues[stage::EXECUTE]->executeCommandList(_command_list[stage::EXECUTE], _fence[stage::EXECUTE]);
- _logger.debug("DiscretePipeline - push() completed");
- };
-
- void pull() override {
- _logger.debug("DiscretePipeline - pull() started");
- OV_ITT_TASK_CHAIN(ZERO_INFER_REQUEST_DP_PULL,
- itt::domains::LevelZeroBackend,
- "DiscretePipeline::pull",
- "EXECUTE");
- // Wait for execute to finish
- _fence[stage::EXECUTE].hostSynchronize();
- OV_ITT_TASK_NEXT(ZERO_INFER_REQUEST_DP_PULL, "READBACK");
- // Schedule the copy of outputs from zeDriverAllocDeviceMem to zeDriverAllocHostMem
- _command_queues[stage::READBACK]->executeCommandList(_command_list[stage::READBACK], _fence[stage::READBACK]);
- // Wait for output copy to finish execution for _fence from the host, to make sure that data
- // is available in the hostMem buffer of the output
- _fence[stage::READBACK].hostSynchronize();
- _logger.debug("DiscretePipeline - pull() completed");
- };
-
- void reset() const override {
- // Reset the fence objects
- for (auto& fence : _fence) {
- fence.reset();
+ /// append timestamp command if feature was activated
+ if (_npu_profiling != nullptr) {
+ _command_lists.at(i)->appendBarrier();
+ _command_lists.at(i)->appendNpuTimestamp(reinterpret_cast<uint64_t*>(_npu_profiling->npu_ts_infer_start));
}
- };
-
- void updateCommandList(const TensorData&, const uint32_t) override{};
-private:
- const Config _config;
- const std::array<std::shared_ptr<CommandQueue>, stage::COUNT>& _command_queues;
- std::array<CommandList, stage::COUNT> _command_list;
- std::array<Fence, stage::COUNT> _fence;
- EventPool _event_pool;
- std::array<Event, stage::COUNT> _event;
- Logger _logger;
-};
-
-struct IntegratedPipeline final : public Pipeline {
-public:
- IntegratedPipeline(const Config& config,
- const ze_device_handle_t& device_handle,
- ze_context_handle_t& context,
- ze_graph_dditable_ext_curr_t* graph_ddi_table_ext,
- const std::shared_ptr<const IExecutor>& executorPtr,
- ze_graph_profiling_query_handle_t profiling_handle,
- std::shared_ptr<zeroProfiling::NpuInferProfiling> npu_profiling,
- CommandQueue& command_queue,
- const uint32_t& group_ordinal,
- const std::vector<std::optional<TensorData>>& inputTensorsData,
- const std::vector<std::optional<TensorData>>& outputTensorsData,
- const size_t numberOfCommandLists)
- : _config(config),
- _executor(static_cast<const ZeroExecutor*>(executorPtr.get())),
- _command_queue{command_queue},
- _event_pool{device_handle,
- context,
- numberOfCommandLists ? static_cast<uint32_t>(numberOfCommandLists) : 1,
- _config},
- _npu_profiling(std::move(npu_profiling)),
- _logger("IntegratedPipeline", _config.get<LOG_LEVEL>()) {
- OV_ITT_SCOPED_TASK(itt::domains::LevelZeroBackend,
- "Zero_infer_request::IntegratedPipeline::IntegratedPipeline");
- _logger.debug("IntegratedPipeline - initialize started");
+ _command_lists.at(i)->appendGraphExecute(_executor->graph(), profiling_query.getHandle());
- _command_lists.reserve(numberOfCommandLists);
- _events.reserve(numberOfCommandLists);
- _fences.reserve(numberOfCommandLists);
- _logger.debug("IntegratedPipeline - emplace_back _event_pool and _command_queue");
- for (size_t i = 0; i < numberOfCommandLists; i++) {
- _command_lists.emplace_back(std::make_unique<CommandList>(
- device_handle,
- context,
- graph_ddi_table_ext,
- _config,
- group_ordinal,
- _executor->getInitStructs()->getMutableCommandListVersion() ? true : false));
- _events.emplace_back(std::make_unique<Event>(_event_pool.handle(), static_cast<uint32_t>(i), _config));
- _fences.emplace_back(std::make_unique<Fence>(_command_queue, _config));
+ /// append timestamp command if feature was activated
+ if (_npu_profiling != nullptr) {
+ _command_lists.at(i)->appendBarrier();
+ _command_lists.at(i)->appendNpuTimestamp(reinterpret_cast<uint64_t*>(_npu_profiling->npu_ts_infer_end));
}
- for (size_t i = 0; i < numberOfCommandLists; i++) {
- size_t ioIndex = 0;
- for (const auto& desc : _executor->get_input_descriptors()) {
- _executor->setArgumentValue(desc.idx,
- static_cast<unsigned char*>(inputTensorsData.at(ioIndex)->mem) +
- (i * inputTensorsData.at(ioIndex)->size) / numberOfCommandLists);
- ++ioIndex;
- }
-
- ioIndex = 0;
- for (const auto& desc : _executor->get_output_descriptors()) {
- _executor->setArgumentValue(desc.idx,
- static_cast<unsigned char*>(outputTensorsData.at(ioIndex)->mem) +
- (i * outputTensorsData.at(ioIndex)->size) / numberOfCommandLists);
- ++ioIndex;
- }
-
- /// append timestamp command if feature was activated
- if (_npu_profiling != nullptr) {
- _command_lists.at(i)->appendBarrier();
- _command_lists.at(i)->appendNpuTimestamp(
- reinterpret_cast<uint64_t*>(_npu_profiling->npu_ts_infer_start));
- }
-
- _command_lists.at(i)->appendGraphExecute(_executor->graph(), profiling_handle);
-
- /// append timestamp command if feature was activated
- if (_npu_profiling != nullptr) {
- _command_lists.at(i)->appendBarrier();
- _command_lists.at(i)->appendNpuTimestamp(reinterpret_cast<uint64_t*>(_npu_profiling->npu_ts_infer_end));
- }
-
- // appendBarrier used in L0 as well
- if (!sync_output_with_fences_) {
- _command_lists.at(i)->appendBarrier();
- _events.at(i)->AppendSignalEvent(*_command_lists.at(i));
- }
- _command_lists.at(i)->close();
+ // appendBarrier used in L0 as well
+ if (!sync_output_with_fences_) {
+ _command_lists.at(i)->appendBarrier();
+ _events.at(i)->AppendSignalEvent(*_command_lists.at(i));
}
- _logger.debug("IntegratedPipeline - initialize completed");
+ _command_lists.at(i)->close();
}
+ _logger.debug("IntegratedPipeline - initialize completed");
+}
- IntegratedPipeline(const IntegratedPipeline&) = delete;
- IntegratedPipeline& operator=(const IntegratedPipeline&) = delete;
- virtual ~IntegratedPipeline() = default;
-
- void push() override {
- _logger.debug("IntegratedPipeline - push() started");
+void Pipeline::push() {
+ _logger.debug("IntegratedPipeline - push() started");
- for (size_t i = 0; i < _command_lists.size(); ++i) {
- OV_ITT_TASK_CHAIN(ZERO_EXECUTOR_IP_PUSH, itt::domains::LevelZeroBackend, "IntegratedPipeline", "push");
- if (sync_output_with_fences_) {
- _command_queue.executeCommandList(*_command_lists.at(i), *_fences.at(i));
- } else {
- _command_queue.executeCommandList(*_command_lists.at(i));
- }
+ for (size_t i = 0; i < _command_lists.size(); ++i) {
+ OV_ITT_TASK_CHAIN(ZERO_EXECUTOR_IP_PUSH, itt::domains::LevelZeroBackend, "IntegratedPipeline", "push");
+ if (sync_output_with_fences_) {
+ _command_queue.executeCommandList(*_command_lists.at(i), *_fences.at(i));
+ } else {
+ _command_queue.executeCommandList(*_command_lists.at(i));
}
+ }
- _logger.debug("IntegratedPipeline - push() completed");
- };
+ _logger.debug("IntegratedPipeline - push() completed");
+};
- void pull() override {
- _logger.debug("IntegratedPipeline - pull() started");
- OV_ITT_TASK_CHAIN(ZERO_EXECUTOR_IP_PULL, itt::domains::LevelZeroBackend, "IntegratedPipeline", "pull");
+void Pipeline::pull() {
+ _logger.debug("IntegratedPipeline - pull() started");
+ OV_ITT_TASK_CHAIN(ZERO_EXECUTOR_IP_PULL, itt::domains::LevelZeroBackend, "IntegratedPipeline", "pull");
- for (size_t i = 0; i < _command_lists.size(); ++i) {
- if (sync_output_with_fences_) {
- _fences.at(i)->hostSynchronize();
- } else {
- _events.at(i)->hostSynchronize();
- }
- /// sample npu timestamps if feature was activated
- if (_npu_profiling != nullptr) {
- _npu_profiling->sampleNpuTimestamps();
- }
+ for (size_t i = 0; i < _command_lists.size(); ++i) {
+ if (sync_output_with_fences_) {
+ _fences.at(i)->hostSynchronize();
+ } else {
+ _events.at(i)->hostSynchronize();
}
-
- _logger.debug("IntegratedPipeline - pull() completed");
- };
-
- void reset() const override {
- _logger.debug("IntegratedPipeline - rest() started");
-
- for (size_t i = 0; i < _command_lists.size(); ++i) {
- if (sync_output_with_fences_) {
- _fences.at(i)->reset();
- } else {
- _events.at(i)->reset();
- }
+ /// sample npu timestamps if feature was activated
+ if (_npu_profiling != nullptr) {
+ _npu_profiling->sampleNpuTimestamps();
}
+ }
- _logger.debug("IntegratedPipeline - rest() completed");
- };
+ _logger.debug("IntegratedPipeline - pull() completed");
+};
- void updateCommandList(const TensorData& tensorsData, const uint32_t index) override {
- OV_ITT_TASK_CHAIN(ZERO_EXECUTOR_IP_UMCL,
- itt::domains::LevelZeroBackend,
- "IntegratedPipeline",
- "updateCommandList");
- const size_t numberOfCommandLists = _command_lists.size();
+void Pipeline::reset() const {
+ _logger.debug("IntegratedPipeline - rest() started");
- for (size_t i = 0; i < numberOfCommandLists; i++) {
- _command_lists.at(i)->updateMutableCommandList(
- index,
- static_cast<unsigned char*>(tensorsData.mem) + (i * tensorsData.size) / numberOfCommandLists);
- _command_lists.at(i)->close();
+ for (size_t i = 0; i < _command_lists.size(); ++i) {
+ if (sync_output_with_fences_) {
+ _fences.at(i)->reset();
+ } else {
+ _events.at(i)->reset();
}
- };
+ }
-private:
- const Config _config;
- const ZeroExecutor* _executor;
- CommandQueue& _command_queue;
- std::vector<std::unique_ptr<CommandList>> _command_lists;
- std::vector<std::unique_ptr<Fence>> _fences;
- EventPool _event_pool;
- std::vector<std::unique_ptr<Event>> _events;
- bool sync_output_with_fences_ = true;
- std::shared_ptr<zeroProfiling::NpuInferProfiling> _npu_profiling;
- Logger _logger;
+ _logger.debug("IntegratedPipeline - rest() completed");
};
-std::unique_ptr<Pipeline> makePipeline(const std::shared_ptr<const IExecutor>& executorPtr,
- const Config& config,
- zeroProfiling::ProfilingPool& profiling_pool,
- zeroProfiling::ProfilingQuery& profiling_query,
- std::shared_ptr<zeroProfiling::NpuInferProfiling> npu_profiling,
- const std::vector<std::optional<TensorData>>& inputTensorsData,
- const std::vector<std::optional<TensorData>>& outputTensorsData,
- const size_t numberOfCommandLists) {
- OV_ITT_SCOPED_TASK(itt::domains::LevelZeroBackend, "Infer_request::makePipeline");
- if (profiling_pool.create())
- profiling_query.create(profiling_pool._handle);
-
- const ZeroExecutor* executor = static_cast<const ZeroExecutor*>(executorPtr.get());
-
- const ze_device_handle_t device_handle = executor->getInitStructs()->getDevice();
- ze_context_handle_t context = executor->getInitStructs()->getContext();
- ze_graph_dditable_ext_curr_t* graph_ddi_table_ext = executor->getInitStructs()->getGraphDdiTable();
- auto& command_queues = executor->getCommandQueue();
- uint32_t group_ordinal = executor->get_group_ordinal();
-
- ze_device_properties_t properties = {};
- properties.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
- zeroUtils::throwOnFail("zeDeviceGetProperties", zeDeviceGetProperties(device_handle, &properties));
+void Pipeline::updateCommandList(const TensorData& tensorsData, const uint32_t index) {
+ OV_ITT_TASK_CHAIN(ZERO_EXECUTOR_IP_UMCL, itt::domains::LevelZeroBackend, "IntegratedPipeline", "updateCommandList");
+ const size_t numberOfCommandLists = _command_lists.size();
- if (properties.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED) {
- return std::make_unique<IntegratedPipeline>(config,
- device_handle,
- context,
- graph_ddi_table_ext,
- executorPtr,
- profiling_query.getHandle(),
- npu_profiling,
- *command_queues[stage::EXECUTE],
- group_ordinal,
- inputTensorsData,
- outputTensorsData,
- numberOfCommandLists);
+ for (size_t i = 0; i < numberOfCommandLists; i++) {
+ _command_lists.at(i)->updateMutableCommandList(
+ index,
+ static_cast<unsigned char*>(tensorsData.mem) + (i * tensorsData.size) / numberOfCommandLists);
+ _command_lists.at(i)->close();
}
-
- return std::make_unique<DiscretePipeline>(config,
- device_handle,
- context,
- graph_ddi_table_ext,
- executorPtr,
- profiling_query.getHandle(),
- command_queues,
- group_ordinal,
- inputTensorsData,
- outputTensorsData);
-}
+};
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/plugin/src/plugin.cpp b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
index 30e5ccf9324..260768b3690 100644
--- a/src/plugins/intel_npu/src/plugin/src/plugin.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
@@ -91,13 +91,13 @@ std::shared_ptr<ov::Model> create_dummy_model(const std::vector<IODescriptor>& i
/**
* @brief Setting batching mode
- * @details In the case of older drivers or discrete platforms, we force batching to compiler mode since it is not
+ * @details In the case of older drivers, we force batching to compiler mode since it is not
* supported. Othwersie set it tu AUTO if this wasn't set by the user
* @param isBatchingSupported Newer driver versions support batching mode on the plugin.
* @param config A configuration map.
*/
void set_batch_config(bool isBatchingSupported, Config& config) {
- if (!isBatchingSupported || config.get<PLATFORM>() == ov::intel_npu::Platform::NPU3700) {
+ if (!isBatchingSupported) {
if (config.has<BATCH_MODE>()) {
if (config.get<BATCH_MODE>() == ov::intel_npu::BatchMode::PLUGIN) {
OPENVINO_THROW("Batching on plugin is not supported with this driver version");
diff --git a/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp b/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp
index c5fb948ee7e..340d28f18a4 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp
@@ -9,18 +9,19 @@
#include <intel_npu/al/config/compiler.hpp>
#include <string>
#include <vector>
+
#include "common/functions.h"
#include "common/npu_test_env_cfg.hpp"
#include "intel_npu/al/config/common.hpp"
#include "npu_private_properties.hpp"
+
using CompilerType = ov::intel_npu::CompilerType;
namespace {
-class TestCompiledModelNPU :
- public ov::test::behavior::OVPluginTestBase,
- public testing::WithParamInterface<std::tuple<std::string, ov::AnyMap>> {
+class TestCompiledModelNPU : public ov::test::behavior::OVPluginTestBase,
+ public testing::WithParamInterface<std::tuple<std::string, ov::AnyMap>> {
public:
void SetUp() override {
std::tie(target_device, configuration) = GetParam();
@@ -52,7 +53,7 @@ protected:
TEST_P(TestCompiledModelNPU, samePlatformProduceTheSameBlob) {
SKIP_IF_CURRENT_TEST_IS_DISABLED() {
- std::string platform = ov::test::utils::getTestsPlatformFromEnvironmentOr("3700");
+ std::string platform = ov::test::utils::getTestsPlatformFromEnvironmentOr("3720");
configuration[ov::intel_npu::create_executor.name()] = "0";
auto configuration1 = configuration;
@@ -79,9 +80,9 @@ protected:
void SetUp() override {
const auto devices = core->get_available_devices();
const auto isNPUDeviceAvailable =
- std::find_if(devices.cbegin(), devices.cend(), [this](const std::string& device) {
- return device.find(target_device) != std::string::npos;
- }) != devices.cend();
+ std::find_if(devices.cbegin(), devices.cend(), [this](const std::string& device) {
+ return device.find(target_device) != std::string::npos;
+ }) != devices.cend();
if (isNPUDeviceAvailable) {
GTEST_SKIP() << "Skip the tests since device is available";
}
@@ -98,15 +99,15 @@ TEST_P(TestCompileModelWithoutDeviceNPU, ThrowIfNoDeviceAndNoPlatform) {
TEST_P(TestCompileModelWithoutDeviceNPU, NoThrowIfNoDeviceAndButPlatformPassed) {
SKIP_IF_CURRENT_TEST_IS_DISABLED() {
auto netConfiguration = configuration;
- netConfiguration[ov::intel_npu::platform.name()] = ov::test::utils::getTestsPlatformFromEnvironmentOr("3700");
+ netConfiguration[ov::intel_npu::platform.name()] = ov::test::utils::getTestsPlatformFromEnvironmentOr("3720");
const auto& ov_model = buildSingleLayerSoftMaxNetwork();
OV_ASSERT_NO_THROW(auto compiled_model = core->compile_model(ov_model, target_device, netConfiguration));
}
}
const std::map<std::string_view, std::array<std::string_view, 2>> wrongDevice = {
- // {orig, {wrong for MLIR}}
- {"VPU3700", {"VPU0000"}}, {"VPU3720", {"VPU0000"}},
+ // {orig, {wrong for MLIR}}
+ {"VPU3720", {"VPU0000"}},
};
std::string getWrongDevice(const std::string_view platform, const CompilerType&) {
@@ -120,9 +121,8 @@ std::string getWrongDevice(const std::string_view platform, const CompilerType&)
}
const std::map<std::string_view, std::array<std::string_view, 2>> validDevice = {
- // {orig, {valid for MLIR}}
- {"VPU3700", {"VPU3700"}}, {"VPU3720", {"VPU3720"}}
-};
+ // {orig, {valid for MLIR}}
+ {"VPU3720", {"VPU3720"}}};
std::string getValidDevice(const std::string_view platform, const CompilerType&) {
auto device = validDevice.find(platform);
@@ -138,20 +138,20 @@ TEST_P(TestCompileModelWithoutDeviceNPU, CheckDeviceInBlob) {
// Compile model to target plugins, wrong platform specified -> expect an exception
auto netConfigurationMLIR_wrong = configuration;
netConfigurationMLIR_wrong[ov::intel_npu::platform.name()] =
- getWrongDevice(PlatformEnvironment::PLATFORM, CompilerType::MLIR);
+ getWrongDevice(PlatformEnvironment::PLATFORM, CompilerType::MLIR);
netConfigurationMLIR_wrong[ov::intel_npu::compiler_type.name()] = "MLIR";
const auto& ov_model1 = buildSingleLayerSoftMaxNetwork();
EXPECT_ANY_THROW(auto compiled_model =
- core->compile_model(ov_model1, target_device, netConfigurationMLIR_wrong));
+ core->compile_model(ov_model1, target_device, netConfigurationMLIR_wrong));
// Compile model to target plugins, valid platform specified -> expect no exception
auto netConfigurationMLIR_valid = configuration;
netConfigurationMLIR_valid[ov::intel_npu::platform.name()] =
- getValidDevice(PlatformEnvironment::PLATFORM, CompilerType::MLIR);
+ getValidDevice(PlatformEnvironment::PLATFORM, CompilerType::MLIR);
netConfigurationMLIR_valid[ov::intel_npu::compiler_type.name()] = "MLIR";
const auto& ov_model2 = buildSingleLayerSoftMaxNetwork();
EXPECT_NO_THROW(auto compiled_model =
- core->compile_model(ov_model2, target_device, netConfigurationMLIR_valid));
+ core->compile_model(ov_model2, target_device, netConfigurationMLIR_valid));
}
}
diff --git a/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp b/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp
index 8a2fd6039da..5f2b9836199 100644
--- a/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp
+++ b/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp
@@ -3,12 +3,14 @@
//
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/config.hpp"
-#include "intel_npu/al/config/common.hpp"
#include <cstdlib>
#include <stdexcept>
+#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/al/config/config.hpp"
+
+
namespace ov::test::utils {
NpuTestEnvConfig::NpuTestEnvConfig() {
@@ -142,14 +144,14 @@ const NpuTestEnvConfig& NpuTestEnvConfig::getInstance() {
std::string getTestsDeviceNameFromEnvironmentOr(const std::string& instead) {
return (!NpuTestEnvConfig::getInstance().IE_NPU_TESTS_DEVICE_NAME.empty())
- ? NpuTestEnvConfig::getInstance().IE_NPU_TESTS_DEVICE_NAME
- : instead;
+ ? NpuTestEnvConfig::getInstance().IE_NPU_TESTS_DEVICE_NAME
+ : instead;
}
std::string getTestsPlatformFromEnvironmentOr(const std::string& instead) {
return (!NpuTestEnvConfig::getInstance().IE_NPU_TESTS_PLATFORM.empty())
- ? NpuTestEnvConfig::getInstance().IE_NPU_TESTS_PLATFORM
- : instead;
+ ? NpuTestEnvConfig::getInstance().IE_NPU_TESTS_PLATFORM
+ : instead;
}
std::string getDeviceNameTestCase(const std::string& str) {
@@ -158,7 +160,7 @@ std::string getDeviceNameTestCase(const std::string& str) {
}
std::string getDeviceName() {
- return ov::test::utils::getTestsDeviceNameFromEnvironmentOr("NPU.3700");
+ return ov::test::utils::getTestsDeviceNameFromEnvironmentOr("NPU.3720");
}
std::string getDeviceNameID(const std::string& str) {
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp
index 967cce5f88e..2803e0fa161 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp
@@ -3,31 +3,32 @@
//
#include "overload/ov_plugin/core_integration.hpp"
+
#include "behavior/compiled_model/properties.hpp"
#include "behavior/ov_plugin/core_integration_sw.hpp"
#include "behavior/ov_plugin/properties_tests.hpp"
#include "common/functions.h"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
+#include "common/utils.hpp"
#include "common_test_utils/subgraph_builders/conv_pool_relu.hpp"
#include "common_test_utils/test_assertions.hpp"
#include "functional_test_utils/ov_plugin_cache.hpp"
#include "intel_npu/al/config/common.hpp"
#include "openvino/runtime/intel_npu/properties.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::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)),
+ std::make_pair(std::string(NPU_PLUGIN_LIB_NAME), std::string(ov::test::utils::DEVICE_NPU)),
};
namespace OVClassBasicTestName {
@@ -56,15 +57,20 @@ static std::string getTestCaseName(testing::TestParamInfo<std::string> obj) {
const std::vector<ov::AnyMap> configs = {{}};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVBasicPropertiesTestsP, OVBasicPropertiesTestsP,
- ::testing::ValuesIn(plugins), OVClassBasicTestName::getTestCaseName);
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVBasicPropertiesTestsP,
+ OVBasicPropertiesTestsP,
+ ::testing::ValuesIn(plugins),
+ OVClassBasicTestName::getTestCaseName);
#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVClassBasicTestP, OVClassBasicTestPNPU, ::testing::ValuesIn(plugins),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVClassBasicTestP,
+ OVClassBasicTestPNPU,
+ ::testing::ValuesIn(plugins),
OVClassBasicTestName::getTestCaseName);
#endif
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_OVClassNetworkTestP, OVClassNetworkTestPNPU,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_OVClassNetworkTestP,
+ OVClassNetworkTestPNPU,
::testing::Combine(::testing::ValuesIn(devices), ::testing::ValuesIn(configs)),
OVClassNetworkTestPNPU::getTestCaseName);
@@ -72,71 +78,81 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_OVClassNetworkTestP, OVClassNetwork
// IE Class GetMetric
//
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVGetMetricPropsTest_nightly, OVGetMetricPropsTest, ::testing::ValuesIn(devices),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVGetMetricPropsTest_nightly,
+ OVGetMetricPropsTest,
+ ::testing::ValuesIn(devices),
OVClassNetworkTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVGetMetricPropsTest_nightly, OVGetMetricPropsOptionalTest,
- ::testing::ValuesIn(devices), OVClassNetworkTestName::getTestCaseName);
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVGetMetricPropsTest_nightly,
+ OVGetMetricPropsOptionalTest,
+ ::testing::ValuesIn(devices),
+ OVClassNetworkTestName::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
- smoke_BehaviorTests_OVCheckSetSupportedRWMandatoryMetricsPropsTests, OVCheckSetSupportedRWMetricsPropsTests,
- ::testing::Combine(::testing::Values("MULTI", "AUTO"),
- ::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWOptionalPropertiesValues(
- {ov::log::level.name()}))),
- ov::test::utils::appendPlatformTypeTestName<OVCheckSetSupportedRWMetricsPropsTests>);
+ smoke_BehaviorTests_OVCheckSetSupportedRWMandatoryMetricsPropsTests,
+ OVCheckSetSupportedRWMetricsPropsTests,
+ ::testing::Combine(::testing::Values("MULTI", "AUTO"),
+ ::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWOptionalPropertiesValues(
+ {ov::log::level.name()}))),
+ ov::test::utils::appendPlatformTypeTestName<OVCheckSetSupportedRWMetricsPropsTests>);
const std::vector<ov::AnyMap> multiConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NPU)}};
const std::vector<ov::AnyMap> configsDeviceProperties = {
- {ov::device::properties(ov::test::utils::DEVICE_NPU, ov::num_streams(4))}};
+ {ov::device::properties(ov::test::utils::DEVICE_NPU, ov::num_streams(4))}};
const std::vector<ov::AnyMap> configsWithSecondaryProperties = {
- {ov::device::properties(ov::test::utils::DEVICE_NPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
- {ov::device::properties(ov::test::utils::DEVICE_NPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
- ov::device::properties(ov::test::utils::DEVICE_NPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))}};
+ {ov::device::properties(ov::test::utils::DEVICE_NPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
+ {ov::device::properties(ov::test::utils::DEVICE_NPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
+ ov::device::properties(ov::test::utils::DEVICE_NPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))}};
const std::vector<ov::AnyMap> multiConfigsWithSecondaryProperties = {
- {ov::device::priorities(ov::test::utils::DEVICE_CPU),
- ov::device::properties(ov::test::utils::DEVICE_CPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
- {ov::device::priorities(ov::test::utils::DEVICE_CPU),
- ov::device::properties(ov::test::utils::DEVICE_CPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
- ov::device::properties(ov::test::utils::DEVICE_NPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))}};
+ {ov::device::priorities(ov::test::utils::DEVICE_CPU),
+ ov::device::properties(ov::test::utils::DEVICE_CPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
+ {ov::device::priorities(ov::test::utils::DEVICE_CPU),
+ ov::device::properties(ov::test::utils::DEVICE_CPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
+ ov::device::properties(ov::test::utils::DEVICE_NPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))}};
const std::vector<ov::AnyMap> autoConfigsWithSecondaryProperties = {
- {ov::device::priorities(ov::test::utils::DEVICE_CPU),
- ov::device::properties("AUTO", ov::enable_profiling(false),
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
- {ov::device::priorities(ov::test::utils::DEVICE_CPU),
- ov::device::properties(ov::test::utils::DEVICE_CPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
- {ov::device::priorities(ov::test::utils::DEVICE_CPU),
- ov::device::properties(ov::test::utils::DEVICE_CPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
- ov::device::properties(ov::test::utils::DEVICE_NPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))},
- {ov::device::priorities(ov::test::utils::DEVICE_CPU),
- ov::device::properties("AUTO", ov::enable_profiling(false),
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)),
- ov::device::properties(ov::test::utils::DEVICE_CPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
- {ov::device::priorities(ov::test::utils::DEVICE_CPU),
- ov::device::properties("AUTO", ov::enable_profiling(false),
- ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)),
- ov::device::properties(ov::test::utils::DEVICE_CPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
- ov::device::properties(ov::test::utils::DEVICE_NPU,
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))}};
+ {ov::device::priorities(ov::test::utils::DEVICE_CPU),
+ ov::device::properties("AUTO",
+ ov::enable_profiling(false),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
+ {ov::device::priorities(ov::test::utils::DEVICE_CPU),
+ ov::device::properties(ov::test::utils::DEVICE_CPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
+ {ov::device::priorities(ov::test::utils::DEVICE_CPU),
+ ov::device::properties(ov::test::utils::DEVICE_CPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
+ ov::device::properties(ov::test::utils::DEVICE_NPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))},
+ {ov::device::priorities(ov::test::utils::DEVICE_CPU),
+ ov::device::properties("AUTO",
+ ov::enable_profiling(false),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)),
+ ov::device::properties(ov::test::utils::DEVICE_CPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
+ {ov::device::priorities(ov::test::utils::DEVICE_CPU),
+ ov::device::properties("AUTO",
+ ov::enable_profiling(false),
+ ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)),
+ ov::device::properties(ov::test::utils::DEVICE_CPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
+ ov::device::properties(ov::test::utils::DEVICE_NPU,
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))}};
//
// IE Class GetConfig
//
-INSTANTIATE_TEST_SUITE_P(BehaviorTests_OVGetConfigTest_nightly, OVGetConfigTest, ::testing::ValuesIn(devices),
+INSTANTIATE_TEST_SUITE_P(BehaviorTests_OVGetConfigTest_nightly,
+ OVGetConfigTest,
+ ::testing::ValuesIn(devices),
OVClassNetworkTestName::getTestCaseName);
// IE Class Load network
@@ -163,7 +179,8 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_BehaviorTests_OVClassLoadNetworkAndCheck
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU, "AUTO:NPU", "MULTI:NPU"),
::testing::ValuesIn(configsDeviceProperties)));
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_OVClassLoadNetworkTest, OVClassLoadNetworkTestNPU,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_OVClassLoadNetworkTest,
+ OVClassLoadNetworkTestNPU,
::testing::Combine(::testing::ValuesIn(devices), ::testing::ValuesIn(configs)),
OVClassLoadNetworkTestNPU::getTestCaseName);
@@ -199,8 +216,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, DeviceAllocMemSizeLesserAfterModelIsLoad
SKIP_IF_CURRENT_TEST_IS_DISABLED() {
auto model = ov::test::utils::make_conv_pool_relu();
- OV_ASSERT_NO_THROW(ie.compile_model(
- model, target_device, {}));
+ OV_ASSERT_NO_THROW(ie.compile_model(model, target_device, {}));
}
OV_ASSERT_NO_THROW(p = ie.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
@@ -223,9 +239,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeLesserAfterModelIsL
SKIP_IF_CURRENT_TEST_IS_DISABLED() {
auto model = ov::test::utils::make_conv_pool_relu();
- OV_ASSERT_NO_THROW(
- ie.compile_model(model, target_device,
- ov::AnyMap{ov::log::level(ov::log::Level::DEBUG)}));
+ OV_ASSERT_NO_THROW(ie.compile_model(model, target_device, ov::AnyMap{ov::log::level(ov::log::Level::DEBUG)}));
}
OV_ASSERT_NO_THROW(p = ie.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
@@ -266,31 +280,36 @@ TEST_P(OVClassCompileModel, CompileModelWithDifferentThreadNumbers) {
EXPECT_ANY_THROW(ie.compile_model(model, target_device, {{ov::compilation_num_threads.name(), ov::Any(-1)}}));
OV_EXPECT_THROW(
- std::ignore = ie.compile_model(model, target_device, {{ov::compilation_num_threads.name(), ov::Any(-1)}}),
- ::ov::Exception, testing::HasSubstr("ov::compilation_num_threads must be positive int32 value"));
+ std::ignore = ie.compile_model(model, target_device, {{ov::compilation_num_threads.name(), ov::Any(-1)}}),
+ ::ov::Exception,
+ testing::HasSubstr("ov::compilation_num_threads must be positive int32 value"));
}
-INSTANTIATE_TEST_SUITE_P(nightly_BehaviorTests_OVClassGetMetricTest, OVClassGetMetricAndPrintNoThrow,
- ::testing::Values(ov::test::utils::DEVICE_NPU), OVClassNetworkTestName::getTestCaseName);
+INSTANTIATE_TEST_SUITE_P(nightly_BehaviorTests_OVClassGetMetricTest,
+ OVClassGetMetricAndPrintNoThrow,
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
+ OVClassNetworkTestName::getTestCaseName);
// Several devices case
-INSTANTIATE_TEST_SUITE_P(compatibility_nightly_BehaviorTests_OVClassSeveralDevicesTest, OVClassSeveralDevicesTestCompileModel,
+INSTANTIATE_TEST_SUITE_P(compatibility_nightly_BehaviorTests_OVClassSeveralDevicesTest,
+ OVClassSeveralDevicesTestCompileModel,
::testing::Values(std::vector<std::string>(
- {std::string(ov::test::utils::DEVICE_NPU) + "." +
- removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700"))})),
+ {std::string(ov::test::utils::DEVICE_NPU) + "." +
+ removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720"))})),
(ov::test::utils::appendPlatformTypeTestName<OVClassSeveralDevicesTestCompileModel>));
-INSTANTIATE_TEST_SUITE_P(compatibility_nightly_BehaviorTests_OVClassModelOptionalTestP, OVClassModelOptionalTestP,
+INSTANTIATE_TEST_SUITE_P(compatibility_nightly_BehaviorTests_OVClassModelOptionalTestP,
+ OVClassModelOptionalTestP,
::testing::Values(ov::test::utils::DEVICE_NPU),
(ov::test::utils::appendPlatformTypeTestName<OVClassModelOptionalTestP>));
-INSTANTIATE_TEST_SUITE_P(
- compatibility_nightly_BehaviorTests_OVClassSeveralDevicesTest, OVClassSeveralDevicesTestQueryModel,
- ::testing::Values(std::vector<std::string>(
- {std::string(ov::test::utils::DEVICE_NPU) + "." +
- removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700")),
- std::string(ov::test::utils::DEVICE_NPU) + "." +
- removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700"))})),
- (ov::test::utils::appendPlatformTypeTestName<OVClassSeveralDevicesTestQueryModel>));
+INSTANTIATE_TEST_SUITE_P(compatibility_nightly_BehaviorTests_OVClassSeveralDevicesTest,
+ OVClassSeveralDevicesTestQueryModel,
+ ::testing::Values(std::vector<std::string>(
+ {std::string(ov::test::utils::DEVICE_NPU) + "." +
+ removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720")),
+ std::string(ov::test::utils::DEVICE_NPU) + "." +
+ removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720"))})),
+ (ov::test::utils::appendPlatformTypeTestName<OVClassSeveralDevicesTestQueryModel>));
} // namespace
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp
index e898b9ac240..aa514eed14c 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp
@@ -42,7 +42,7 @@ const std::vector<ov::AnyMap> CorrectPluginMutableProperties = {
{{ov::hint::execution_mode.name(), ov::hint::ExecutionMode::ACCURACY}},
{{ov::hint::num_requests.name(), 2u}},
{{ov::log::level.name(), ov::log::Level::ERR}},
- {{ov::device::id.name(), removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700"))}},
+ {{ov::device::id.name(), removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720"))}},
{{ov::enable_profiling.name(), true}},
};
@@ -77,7 +77,7 @@ const std::vector<std::string> ImmutableProperties{
};
const std::vector<ov::AnyMap> CorrectCompiledModelProperties = {
- {{ov::device::id.name(), removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700"))}},
+ {{ov::device::id.name(), removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720"))}},
{{ov::enable_profiling.name(), true}},
{{ov::hint::performance_mode.name(), ov::hint::PerformanceMode::LATENCY}},
{{ov::hint::execution_mode.name(), ov::hint::ExecutionMode::PERFORMANCE}},
@@ -91,7 +91,7 @@ const std::vector<ov::AnyMap> IncorrectImmutableProperties = {
{{ov::intel_npu::device_alloc_mem_size.name(), 1024}},
{{ov::intel_npu::device_total_mem_size.name(), 2048}},
{{ov::intel_npu::driver_version.name(), 3}},
- {{ov::available_devices.name(), testing::internal::Strings{"3700", "3720"}}},
+ {{ov::available_devices.name(), testing::internal::Strings{"3720"}}},
{{ov::device::capabilities.name(), testing::internal::Strings{ov::device::capability::BF16}}},
{{ov::range_for_async_infer_requests.name(), std::tuple<unsigned int, unsigned int, unsigned int>{1u, 10u, 1u}}},
{{ov::range_for_streams.name(), std::tuple<unsigned int, unsigned int>{1u, 4u}}},
@@ -114,7 +114,7 @@ const std::vector<ov::AnyMap> IncorrectImmutableProperties = {
0x67}}}},
{{ov::device::architecture.name(), "3720"}},
{{ov::device::type.name(), "NPU"}},
- {{ov::device::full_name.name(), "NPU.3700"}},
+ {{ov::device::full_name.name(), "NPU.3720"}},
{{ov::device::pci_info.name(),
ov::device::PCIInfo{0xFFFF, 0xFFFF, 0, 0xFFFF}}}, // setting invalid domain,bus,device and function ids
{{ov::device::gops.name(),
@@ -209,21 +209,21 @@ INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVClassSetDefaultDevi
OVClassSetDefaultDeviceIDPropTest,
::testing::Values(std::make_pair(
ov::test::utils::DEVICE_NPU,
- removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700")))),
+ removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720")))),
(ov::test::utils::appendPlatformTypeTestName<OVClassSetDefaultDeviceIDPropTest>));
INSTANTIATE_TEST_SUITE_P(
smoke_BehaviorTests_OVClassSpecificDeviceTest,
OVSpecificDeviceSetConfigTest,
::testing::Values(std::string(ov::test::utils::DEVICE_NPU) + "." +
- removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700"))),
+ removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720"))),
(ov::test::utils::appendPlatformTypeTestName<OVSpecificDeviceSetConfigTest>));
INSTANTIATE_TEST_SUITE_P(
smoke_BehaviorTests_OVClassSpecificDeviceTest,
OVSpecificDeviceGetConfigTest,
::testing::Values(std::string(ov::test::utils::DEVICE_NPU) + "." +
- removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700"))),
+ removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720"))),
(ov::test::utils::appendPlatformTypeTestName<OVSpecificDeviceGetConfigTest>));
INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVGetAvailableDevicesPropsTest,
@@ -235,7 +235,7 @@ INSTANTIATE_TEST_SUITE_P(
compatibility_smoke_BehaviorTests_OVClassSpecificDeviceTest,
OVSpecificDeviceTestSetConfig,
::testing::Values(std::string(ov::test::utils::DEVICE_NPU) + "." +
- removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3700"))),
+ removeDeviceNameOnlyID(ov::test::utils::getTestsPlatformFromEnvironmentOr("3720"))),
(ov::test::utils::appendPlatformTypeTestName<OVSpecificDeviceTestSetConfig>));
const std::vector<ov::AnyMap> multiConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NPU)}};
@@ -243,8 +243,8 @@ const std::vector<ov::AnyMap> multiConfigs = {{ov::device::priorities(ov::test::
INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_OVClassSetDevicePriorityConfigPropsTest,
OVClassSetDevicePriorityConfigPropsTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI,
- ov::test::utils::DEVICE_AUTO,
- ov::test::utils::DEVICE_HETERO),
+ ov::test::utils::DEVICE_AUTO,
+ ov::test::utils::DEVICE_HETERO),
::testing::ValuesIn(multiConfigs)),
(ov::test::utils::appendPlatformTypeTestName<OVClassSetDevicePriorityConfigPropsTest>));
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp
index 2b259c085a2..c38125a6458 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp
@@ -4,16 +4,16 @@
#include "functional_test_utils/skip_tests_config.hpp"
+#include <intel_npu/utils/logger/logger.hpp>
#include <regex>
#include <string>
#include <vector>
#include "common/functions.h"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
+#include "common/utils.hpp"
#include "common_test_utils/common_utils.hpp"
#include "functional_test_utils/ov_plugin_cache.hpp"
-#include <intel_npu/utils/logger/logger.hpp>
#include "npu_private_properties.hpp"
class BackendName {
@@ -63,7 +63,8 @@ public:
}
// Private device names may be registered via environment variables
- const std::string environmentDevice = ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::intel_npu::Platform::AUTO_DETECT.data());
+ const std::string environmentDevice =
+ ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::intel_npu::Platform::AUTO_DETECT.data());
const std::string standardizedEnvironmentDevice = ov::intel_npu::Platform::standardize(environmentDevice);
if (std::all_of(_availableDevices.begin(), _availableDevices.end(), [&](const std::string& deviceName) {
@@ -87,12 +88,6 @@ public:
});
}
- bool has3700() const {
- return std::any_of(_availableDevices.begin(), _availableDevices.end(), [](const std::string& deviceName) {
- return deviceName.find("3700") != std::string::npos;
- });
- }
-
private:
std::vector<std::string> _availableDevices;
intel_npu::Logger _log = intel_npu::Logger("AvailableDevices", ov::log::Level::INFO);
@@ -133,8 +128,8 @@ public:
private:
struct Entry {
Entry(std::string&& comment, std::vector<std::string>&& patterns)
- : _comment{std::move(comment)}, _patterns{std::move(patterns)} {
- }
+ : _comment{std::move(comment)},
+ _patterns{std::move(patterns)} {}
std::string _comment;
std::vector<std::string> _patterns;
@@ -350,19 +345,6 @@ std::vector<std::string> disabledTestPatterns() {
"smoke_BehaviorTests/DefaultValuesConfigTests.CanSetDefaultValueBackToPlugin.*",
});
- // [Track number: E#80555]
- _skipRegistry.addPatterns(devices.has3700(),
- "Problems with SplitConcat ngraph function", {
- R"(.*smoke_BehaviorTests/InferRequest(CallbackTests|MultithreadingTests|PerfCountersTest|WaitTests)\..*)",
- R"(.*smoke_BehaviorTests(/|/OV)InferRequestCancellationTests\..*)",
- R"(.*smoke(_|_Multi_)BehaviorTests/OVInferRequestIOTensorTest\..*)",
- R"(.*smoke(_|_Auto_|_Multi_)BehaviorTests/OVInferRequest(CallbackTests|IOTensorSetPrecisionTest|MultithreadingTests)\..*)",
- ".*OVClassNetworkTestP.LoadNetworkActual.*",
- ".*OVClassLoadNetworkTestNPU.LoadNetworkHETEROWithDeviceIDNoThrow.*",
- R"(.*OVHoldersTest\..*)",
- R"(.*OVHoldersTestOnImportedNetwork\..*)",
- });
-
_skipRegistry.addPatterns(
"Disabled with ticket number", {
// [Track number: E#48480]
@@ -417,7 +399,6 @@ std::vector<std::string> disabledTestPatterns() {
_skipRegistry.addPatterns(devices.count() && !devices.has3720(), "Tests are disabled for all devices except NPU3720",
{
// [Track number: E#49620]
- ".*NPU3700(\\.|_)(SW|HW).*",
".*NPU3720.*",
// [Track number: E#84621]
".*DriverCompilerAdapterDowngradeInterpolate11TestNPU.*",
@@ -468,38 +449,6 @@ std::vector<std::string> disabledTestPatterns() {
".*OVClassImportExportTestP.*OVClassCompiledModelImportExportTestP.*ImportNetworkThrowWithDeviceName.*"
});
- // [Track number: S#14836]
- _skipRegistry.addPatterns(devices.has3700(),
- "Async tests break on dKMB", {
- ".*ExclusiveAsyncRequests.*",
- });
-
- _skipRegistry.addPatterns(backendName.isZero() && devices.has3700(),
- "TensorIterator layer is not supported by dKMB platform",
- {
- ".*SetBlobTest.*",
- });
-
- _skipRegistry.addPatterns(backendName.isZero() && devices.has3700(), "Convert layer is not supported by dKMB platform",
- {".*PreprocessingPrecisionConvertTest.*", ".*InferRequestPreprocess.*"});
-
- _skipRegistry.addPatterns(backendName.isZero() && devices.has3700(),
- "Tests fail on RPL dKMB boards, start_async() fails intermittently",
- { // [Tracking number: E#90056]
- ".*OVInferConsistencyTest.*",
- // [Tracking number: E#92317]
- ".*OVInferRequestIOTensorTest.*",
- ".*OVInferRequestMultithreadingTests.*",
- ".*OVInferRequestCallbackTests.*",
- ".*InferRequestMultithreadingTests.*",
- ".*InferRequestPerfCountersTest.*",
- ".*InferRequestWaitTests.*",
- ".*OVInferRequestCancellationTest.*",
- ".*InferRequestRunTests.*",
- ".*InferRequestCallbackTests.*",
- ".*InferRequestCancellationTests.*",
- ".*OVCompileAndInferRequest.*"});
-
_skipRegistry.addPatterns(!(backendName.isZero()), "These tests runs only on LevelZero backend",
{".*InferRequestRunTests.*",
".*OVClassGetMetricAndPrintNoThrow.*",
@@ -519,16 +468,6 @@ std::vector<std::string> disabledTestPatterns() {
// [Tracking number: CVS#120240]
".*smoke_BehaviorTests_CachingSupportCase_NPU/CompileModelLoadFromFileTestBase.*"});
- _skipRegistry.addPatterns(devices.has3700(), "Do not run the tests that require a new CiD version on the 3700 platform",
- {
- // [Tracking number: E#92279]
- ".*CompileModelLoadFromFileTestBase.*",
- ".*CorrectConfigTests.CanUseCache.*",
- ".*CorrectConfigTests.CanLoadNetworkWithCorrectConfig.*",
- ".*DriverCompilerAdapterDowngradeInterpolate11TestNPU.CheckOpsetVersion.*",
- ".*DriverCompilerAdapterInputsOutputsTestNPU.CheckInOutputs.*",
- ".*DriverCompilerAdapterExpectedThrowNPU.CheckWrongGraphExtAndThrow.*"});
-
#ifdef WIN32
#elif defined(__linux__)
// [Tracking number: E#103391]
@@ -551,12 +490,6 @@ std::vector<std::string> disabledTestPatterns() {
});
#endif
- _skipRegistry.addPatterns(backendName.isZero(), "Most ProfilingTest_VPU3700 instances break sporadically, only stable instances are left, #65844", {
- ".*precommit_profilingDisabled/ProfilingTest_VPU3700.*",
- ".*precommit_profilingDisabled_drv/ProfilingTest_VPU3700.*",
- ".*precommit_profilingEnabled_drv/ProfilingTest_VPU3700.*",
- });
-
_skipRegistry.addPatterns(backendName.isIMD(), "IMD/Simics do not support the tests",
{
// [Tracking number: E#81065]
@@ -623,32 +556,6 @@ std::vector<std::string> disabledTestPatterns() {
".*smoke_BehaviorTests_OVClassLoadNetworkTest/OVClassLoadNetworkTestNPU.LoadNetworkHETEROWithDeviceIDNoThrow.*"
});
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "error: Value of: ex.what(), Expected: has substring device xml header", {
- ".*smoke_OVClassImportExportTestP/OVClassCompiledModelImportExportTestP.smoke_ImportNetworkThrowWithDeviceName/0.*"
- });
-
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "The device candidate list should not include the meta plugin for MULTI", {
- ".*OVCheckSetSupportedRWMandatoryMetricsPropsTests/OVCheckSetSupportedRWMetricsPropsTests.ChangeCorrectProperties/target_device=MULTI.*"
- });
-
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "The device candidate list should not include the meta plugin for AUTO", {
- ".*OVCheckSetSupportedRWMandatoryMetricsPropsTests/OVCheckSetSupportedRWMetricsPropsTests.ChangeCorrectProperties/target_device=AUTO.*"
- });
-
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "Disabled tests for NPU3700", {
- ".*smoke_BehaviorTest/CompileForDifferentPlatformsTests.CompilationForSpecificPlatform.*DEVICE_ID_3720.*",
- ".*smoke_BehaviorTests/OVCompiledGraphImportExportTest.importExportedFunctionConstantResultOnly.*",
- ".*smoke_BehaviorTests/OVCompiledGraphImportExportTest.importExportedIENetworkConstantResultOnly.*"
- });
-
#ifdef WIN32
// [Track number: CVS-128116]
_skipRegistry.addPatterns("Unicode paths for ov::cache_dir are not correctly handled on Windows",
@@ -686,12 +593,6 @@ std::vector<std::string> disabledTestPatterns() {
".*smoke_BehaviorTests_OVClassLoadNetworkTest/OVClassLoadNetworkTestNPU.LoadNetworkHETEROWithDeviceIDNoThrow.*"
});
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "error: Value of: ex.what(), Expected: has substring device xml header", {
- ".*smoke_OVClassImportExportTestP/OVClassCompiledModelImportExportTestP.smoke_ImportNetworkThrowWithDeviceName/0.*"
- });
-
// [Tracking number: E#114623]
_skipRegistry.addPatterns(!devices.has3720(),
"The private platform names cannot be identified via the \"ov::available_devices\" configuration.", {
@@ -707,27 +608,7 @@ std::vector<std::string> disabledTestPatterns() {
});
// [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "The device candidate list should not include the meta plugin for MULTI", {
- ".*OVCheckSetSupportedRWMandatoryMetricsPropsTests/OVCheckSetSupportedRWMetricsPropsTests.ChangeCorrectProperties/target_device=MULTI.*"
- });
-
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "The device candidate list should not include the meta plugin for AUTO", {
- ".*OVCheckSetSupportedRWMandatoryMetricsPropsTests/OVCheckSetSupportedRWMetricsPropsTests.ChangeCorrectProperties/target_device=AUTO.*"
- });
-
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700(),
- "Disabled tests for NPU3700", {
- ".*smoke_BehaviorTest/CompileForDifferentPlatformsTests.CompilationForSpecificPlatform.*DEVICE_ID_3720.*",
- ".*smoke_BehaviorTests/OVCompiledGraphImportExportTest.importExportedFunctionConstantResultOnly.*",
- ".*smoke_BehaviorTests/OVCompiledGraphImportExportTest.importExportedIENetworkConstantResultOnly.*"
- });
-
- // [Tracking number: E#109040]
- _skipRegistry.addPatterns(devices.has3700() || devices.has3720(),
+ _skipRegistry.addPatterns(devices.has3720(),
"Disabled tests for NPU3720", {
".*smoke.*_BehaviorTests/OVInferRequestCheckTensorPrecision.*type=i16.*",
".*smoke.*_BehaviorTests/OVInferRequestCheckTensorPrecision.*type=u16.*",
@@ -811,24 +692,6 @@ std::vector<std::string> disabledTestPatterns() {
".*smoke_OVClassNetworkTestP/OVClassNetworkTestPNPU.*"
});
- // [Tracking number: E#118348]
- _skipRegistry.addPatterns(devices.has3700() && backendName.isZero(),
- "Failing infer request tests on dKMB using CID", {
- ".*smoke_BehaviorTests/OVInferRequestPerfCountersExceptionTest.perfCountWereNotEnabledExceptionTest.*",
- ".*smoke_Auto_BehaviorTests/OVInferRequestPerfCountersExceptionTest.perfCountWereNotEnabledExceptionTest.*",
- ".*smoke_Multi_BehaviorTests/OVInferRequestPerfCountersExceptionTest.perfCountWereNotEnabledExceptionTest.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_QueryState.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_SetState.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_Reset.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_2infers_set.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_2infers.*",
- ".*smoke_Hetero_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_QueryState.*",
- ".*smoke_Hetero_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_SetState.*",
- ".*smoke_Hetero_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_Reset.*",
- ".*smoke_Hetero_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_2infers_set.*",
- ".*smoke_Hetero_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_2infers.*"
- });
-
// [Tracking number: E#125086]
_skipRegistry.addPatterns(devices.has3720() && backendName.isZero(),
"Failing tests after functional tests migration to OV", {
@@ -840,16 +703,6 @@ std::vector<std::string> disabledTestPatterns() {
".*OVCompiledModelPropertiesDefaultSupportedTests.CanCompileWithDefaultValueFromPlugin.*"
});
- // [Tracking number: E#118348]
- _skipRegistry.addPatterns(devices.has3700() && backendName.isZero(),
- "Failing infer request tests on dKMB using MLIR", {
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_QueryState.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_SetState.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_Reset.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_2infers_set.*",
- ".*smoke_BehaviorTests_VariableState/OVInferRequestVariableStateTest.inferreq_smoke_VariableState_2infers.*"
- });
-
// [Tracking number: E#116494]
_skipRegistry.addPatterns(
"NPU plugin doesn't implement `set_tensors` function", {
@@ -913,18 +766,6 @@ std::vector<std::string> disabledTestPatterns() {
".*smoke_Hetero_BehaviorTests/OVClassCompiledModelImportExportTestP.smoke_ImportNetworkThrowWithDeviceName.*"
});
- // [Tracking number: E#121448]
- _skipRegistry.addPatterns(devices.has3700() && backendName.isZero(), "CID from driver 31.0.100.1937 doesn't support certain properties", {
- ".*smoke_BehaviorTests/OVClassCompiledModelPropertiesTests.canCompileModelWithPropertiesAndCheckGetProperty.*NPU_DYNAMIC_SHAPE_TO_STATIC.*",
- ".*smoke_BehaviorTests/OVClassCompileModelWithCorrectPropertiesTest.CompileModelWithCorrectPropertiesTest.*NPU_DYNAMIC_SHAPE_TO_STATIC.*",
- ".*smoke_BehaviorTests/OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY.GetMetricNoThrow.*NPU_DYNAMIC_SHAPE_TO_STATIC.*",
- ".*smoke_BehaviorTests/OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY.GetMetricNoThrow.*NPU_DYNAMIC_SHAPE_TO_STATIC.*",
- ".*smoke_BehaviorTests/OVClassCompiledModelGetPropertyTest_EXEC_DEVICES.CanGetExecutionDeviceInfo.*NPU_DYNAMIC_SHAPE_TO_STATIC.*",
- ".*smoke_BehaviorTests/OVCompileModelGetExecutionDeviceTests.CanGetExecutionDeviceInfo.*NPU_DYNAMIC_SHAPE_TO_STATIC.*",
- // COMPILATION_NUM_THREADS
- ".*smoke_BehaviorTests/OVCompiledModelPropertiesDefaultSupportedTests.CanCompileWithDefaultValueFromPlugin.*"
- });
-
_skipRegistry.addPatterns("NPU cannot set properties for compiled models", {
".*OVClassCompiledModelSetCorrectConfigTest.canSetConfig.*"
});