Skip to content

Restrict NPU allocator to case when NPU is selected.#558

Closed
javier-intel wants to merge 1 commit intoovep-developfrom
jemartin/npu_allocator_fix
Closed

Restrict NPU allocator to case when NPU is selected.#558
javier-intel wants to merge 1 commit intoovep-developfrom
jemartin/npu_allocator_fix

Conversation

@javier-intel
Copy link

Description

OVEP is currently always reporting the NPU allocator when OV is >= 2024.4. This change restricts reporting the NPU allocator only when NPU is selected in the configuration

Motivation and Context

Adds a second guard against exposing the allocator in the wrong scenario.

@javier-intel javier-intel force-pushed the jemartin/npu_allocator_fix branch 2 times, most recently from 21d9478 to 8b68aa7 Compare February 4, 2025 23:34
endif()

if(OpenVINO_VERSION VERSION_GREATER_EQUAL 2024.4)
if(onnxruntime_USE_OPENVINO_NPU AND (OpenVINO_VERSION VERSION_GREATER_EQUAL 2024.4))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix mitigates the bug which was filed to run on CPU without NPU dependency.

If -use_openvino or -use_openvino CPU is used during build time, then RemoteTensor optimization for NPU will be disabled at runtime which could have a perf impact on models using Remote tensors. @sfatimar need to identify steps used to build OV EP for apps using NPU and investigate impact to existing apps.

@sfatimar
Copy link

sfatimar commented Feb 5, 2025

I think this fix is not required as original issue is not being seen, @vthaniel to confirm https://jira.devtools.intel.com/browse/HAFP-2997

@preetha-intel
Copy link

The change is handled as runtime option in the PR
#478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants