Repository navigation
ggml-openvino: enable NPU L0 host tensors and fast prefill mask by default - #368
Merged
ravi9 merged 2 commits intoOct 29, 2026
Conversation
wine99
approved these changes
Oct 29, 2026
wine99
left a comment
Collaborator
There was a problem hiding this comment.
If fast_mask always works and l0_host_tensor can always fallback automatically, can we simply remove the env var and use them by default?
ravi9
force-pushed
the
dev_backend_openvino
branch
2 times, most recently
from
October 29, 2026 17:37
be796d8 to
25e3135
Compare
Back NPU buffers with Level Zero host memory unless GGML_OPENVINO_NPU_L0_HOST_TENSORS=0. The plugin imports these buffers without a host-to-device copy each infer; on phi-4-mini Q4_0 (pp3072+tg512) decode goes from 7.2 to 10.6-10.8 t/s. Allocation failures still fall back to plain host memory.
GGML_OPENVINO_NPU_FAST_MASK now defaults to 1; set it to 0 to fall back to pad_input() + set_zero_diagonal(). The fast path builds each static prefill mask chunk directly in the OpenVINO input tensor (row memcpy of the valid prefix, -inf padding, zero diagonal), avoiding a temporary chunk_size x context_size vector and a full-tensor copy per chunk. The result is bit-identical to the fallback path.
Owner
|
We can leave the ENV vars as opt-outs for now, and remove/deprecate them in the upcoming releases.. |
ravi9
force-pushed
the
xuejun/enable_npu_fast_mask_default
branch
from
October 29, 2026 19:11
489e77b to
d0eacda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ggml-openvino: enable NPU L0 host tensors and fast prefill mask by default
GGML_OPENVINO_NPU_L0_HOST_TENSORS and GGML_OPENVINO_NPU_FAST_MASK now default to 1; set
either to 0 to disable it.
On phi-4-mini Q4_0 (pp3072+tg512) decode goes from 7.2 to 10.6-10.8 t/s. Allocation
failures still fall back to plain host memory.
temporary vector and no full-tensor copy. The result is identical to pad_input() +
set_zero_diagonal().