]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
CANN: Refactor ND to NZ workspace to be per-device (llama/15763)
authorChenguang Li <redacted>
Thu, 4 Sep 2025 12:20:14 +0000 (20:20 +0800)
committerGeorgi Gerganov <redacted>
Sat, 20 Sep 2025 10:42:49 +0000 (13:42 +0300)
commit3780a3c917f261f45f3ce3e7c10804e1e827f699
treebd195c1248f57d90acaab3013b6dd774c00384df
parent2228462b19a95bc3db4423bae326bab5e816c51d
CANN: Refactor ND to NZ workspace to be per-device (llama/15763)

* CANN:Refactor ND to NZ workspace to be per-device in Ascend backend

- Replaced the previous single global ND→NZ workspace with a per-device
  cache using unordered_map keyed by device ID.
- Functions `release_nz_workspace`, `relloc_nz_workspace`, and
  `get_nz_workspace` now manage workspace independently for each device,
  preventing memory conflicts in multi-device / pipeline parallel scenarios.
- This change fixes potential precision issues caused by workspace
  overwrites when multiple devices perform ND→NZ conversions concurrently.

Co-authored-by: hipudding <redacted>
* refactor

Signed-off-by: noemotiovon <redacted>
* rename

Signed-off-by: noemotiovon <redacted>
* fix review comments

Signed-off-by: noemotiovon <redacted>
---------

Signed-off-by: noemotiovon <redacted>
Co-authored-by: hipudding <redacted>
ggml/src/ggml-cann/ggml-cann.cpp