MIE05E01000A

Fault Symptom

num_npu_blocks is a negative value during NPU memory allocation.

Fault Cause

Due to insufficient NPU memory, forward propagation with the maximum number of requests is performed in the warm-up phase to calculate the workspace of a model, and then the remaining space is allocated to kv_cache.

The calculation formula of kv_cache is as follows: kv_cache = total_memory × memory_fraction – weight – workspace. This results a negative value of num_npu_blocks.

Fault Location

Check whether the values of max_prefill_tokens and max_batch_size are proper. You are advised to decrease their values or increase the value of memory_fraction.