Preserve Ascend KV prefixes across unchanged-weight suspend

Keep the immutable KV layout in the existing runtime allocator and wake transfer staging with the KV payload. Cache-only rounds can copy or zero pages while the original graph remains paused. Model forwards keep their full residency check.

With a fully CPU-backed target, preserve KV and its prefix index through a clean suspend. Invalidate old prefixes before applying a weight update, including same-version partial updates. Discard targets continue to require a complete refill before KV wake. CUDA and ROCm retain their existing pool and prefix policies.

Requires torch-npu-memory-saver 0.1.6 (ABI 5) on Ascend. On A2 and A3, a clean sleep retained 256 cached tokens, while update and discard cases missed on the first request and regained 256 on the next. Verified direct KV page operations with the graph unmapped. On A3, the eight tokens following a single value-projection update matched a separate cold launch. CUDA/HIP coverage used CPU fixtures.

Signed-off-by: yanlonghu <19688573+yanlonghu@users.noreply.github.com>
This commit is contained in:
yanlonghu
2026-11-26 14:35:43 +00:00
parent 54400db66a
commit a03a9a083b
26 changed files with 168 additions and 51 deletions
+6 -8
View File
@@ -69,12 +69,10 @@ export TORCH_HCCL_ZERO_COPY=0
export TASK_QUEUE_ENABLE=1 ASCEND_LAUNCH_BLOCKING=0
```
The NPU kernel backend installs [torch-npu-memory-saver 0.1.5](https://pypi.org/project/torch-npu-memory-saver/0.1.5/)
from PyPI and builds its ABI 4 allocator against the active CANN toolkit.
To add it to an existing NPU installation, run `python -m pip install torch-npu-memory-saver==0.1.5`.
For CPython 3.12 on Linux AArch64 with CANN 9.0.0, you can skip the saver build:
download the [A2-tested wheel](https://github.com/yanlonghu/torch_npu_memory_saver/releases/download/v0.1.5/torch_npu_memory_saver-0.1.5-cp312-cp312-linux_aarch64.whl)
and run `python -m pip install ./torch_npu_memory_saver-0.1.5-cp312-cp312-linux_aarch64.whl` before installing TokenSpeed.
This revision requires `torch-npu-memory-saver==0.1.6` (allocator ABI 5).
The NPU installation builds the PyPI source package against the active CANN
toolkit. CPython 3.12 / Linux AArch64 workers on the tested A2 CANN 9.0.0
stack can also install the [prebuilt wheel](https://github.com/yanlonghu/torch_npu_memory_saver/releases/tag/v0.1.6) first.
Ascend requires protocol 3 and matching host/runtime modules;
an older host is rejected before model initialization. NPU exit protection is
@@ -110,8 +108,8 @@ tokenspeed serve "$CHECKPOINT_A" \
| Tag | Policy |
| --- | --- |
| `weights` | Parameters follow the explicit weight policy. Forward inputs, model runtime state and model workspaces use a separate CPU-backed pool under this tag. |
| `kv_cache` | Discard shared target/draft KV and clear it on wake. |
| `acl_graph` | The default `--acl-graph-memory-policy discard` releases temporaries that replay overwrites. Select `cpu_backup` to restore their bytes from host memory. Both retain the executable and virtual addresses. Releasing this tag also discards resident device KV. Cache transfer tables and workspaces use a separate CPU-backed pool under this tag, including in eager mode. KV copies can continue when only weights sleep. If both KV and this tag sleep, wake this tag before or together with KV. |
| `kv_cache` | With target weights on `cpu_backup`, back up shared target/draft KV and keep the prefix index. A weight update invalidates the old prefix even when its version string is reused. With target weights on `discard`, drop KV and clear it on wake. |
| `acl_graph` | The default `--acl-graph-memory-policy discard` releases temporaries that replay overwrites. Select `cpu_backup` to restore their bytes from host memory. Both retain the executable and virtual addresses. Releasing this tag also suspends KV. KV can wake and service page operations while the graph is still asleep. The immutable cache layout stays in the runtime allocator. |
Persistent backup consumes pinned host memory and adds transfer time. HCCL
communicators and their workspaces stay resident. On Atlas A3, the saver uses
+1 -1
View File
@@ -95,7 +95,7 @@ ts = "tokenspeed.cli:main"
"Homepage" = "https://github.com/lightseekorg/tokenspeed"
[project.optional-dependencies]
ascend-memory-saver = ["torch-npu-memory-saver==0.1.5"]
ascend-memory-saver = ["torch-npu-memory-saver==0.1.6"]
# Capped: 0.1.9 clones internally, so a release that stops would alias silently.
instanttensor = ["instanttensor>=0.1.9,<0.2"]
@@ -29,7 +29,7 @@ cache:
- ``weights``: model parameters (CPU backup, or discard until a complete
replica-committed update; frozen draft allocations retain CPU backup);
- ``kv_cache``: the cache arena (discarded; zeroed on resume);
- ``kv_cache``: the cache arena (Ascend can back up an unchanged target's KV);
- ``cuda_graph``: the decode CUDA graph memory pool (discarded; every replay
rewrites it before reading);
- ``acl_graph``: the Ascend decode graph pool (discarded or backed up to
@@ -89,8 +89,7 @@ def memory_regions(
def resume_kv_cache() -> None:
device.before_kv_resume()
adapter.resume(tag="kv_cache")
# Re-mapped memory holds garbage: zero it, then register it with
# the PD transfer engine again.
# Finish restoring or clearing the arena before exposing it to PD.
device.finish_kv_resume(
synchronize_before_registration=synchronize_kv_before_registration
)
@@ -525,6 +525,7 @@ class HostConfig:
multimodal inputs.
memory_saver: ``--enable-memory-saver``: memory can be released.
memory_regions: The regions this engine can release.
backup_device_kv: The device preserves prefix pages across KV sleep.
allow_reload_forward: ``--allow-reload-forward``: the reload_forward control call is served.
metrics_prometheus_dir: ``PROMETHEUS_MULTIPROC_DIR``, where the host
writes its Prometheus series, when the Prometheus reporter is
@@ -618,6 +619,7 @@ class HostConfig:
multimodal: bool
memory_saver: bool
memory_regions: tuple[str, ...]
backup_device_kv: bool
allow_reload_forward: bool
metrics_prometheus_dir: str | None
metrics_relay_endpoint: str | None
@@ -1780,6 +1782,7 @@ class HostBootstrap:
multimodal=model_config.is_multimodal_active,
memory_saver=server_args.enable_memory_saver,
memory_regions=tuple(regions),
backup_device_kv=server_args.backup_device_kv,
allow_reload_forward=server_args.allow_reload_forward,
metrics_prometheus_dir=(
os.environ["PROMETHEUS_MULTIPROC_DIR"]
@@ -36,6 +36,19 @@ class AscendMemorySaverDeviceHandle(DeviceHandle):
"""Additional launch and weight-update checks for managed Ascend pools."""
_additional_discard_reload_types = (UpdateWeightFromDiskReqInput,)
_stale_kv_backup = False
def commit_weight_update(self, success: bool) -> None:
super().commit_weight_update(success)
# A partial load or a repeated version string can change the target too.
# The host flushed its prefix index before loading. Never expose these
# backed-up bytes through a new transfer registration.
self._stale_kv_backup = self._weight_memory.kv_released
def _restore_kv_contents(self) -> None:
if self._weight_memory.policy == "discard" or self._stale_kv_backup:
super()._restore_kv_contents()
self._stale_kv_backup = False
_TRAINER_WEIGHT_UPDATE_UNSUPPORTED = (
"This trainer weight-update path uses CUDA tensors and is not implemented "
@@ -993,17 +993,17 @@ class DeviceHandle:
else:
self._weight_memory.resume(operation)
def _restore_kv_contents(self) -> None:
self._executor.token_to_kv_pool.clear_kv_buffers()
def finish_kv_resume(self, *, synchronize_before_registration: bool) -> None:
"""Repair the KV arena after a memory-saver wake re-maps its storage.
Re-mapped memory holds garbage, so the arena is zeroed first. The
draft pool names the same arena, so clearing the target's clears both.
FP8 KV scales ride with the weights region and need no reset. The
arena then goes back to the PD transfer engine, which registers the
new physical pages.
The target and draft share an arena. Restore its contents before
registering the new physical pages with the PD transfer engine.
"""
self.settle()
self._executor.token_to_kv_pool.clear_kv_buffers()
self._restore_kv_contents()
if self._kv_transfer is not None:
if synchronize_before_registration:
# NPU transfer registration can expose pages without ordering
@@ -134,6 +134,7 @@ class CacheArena:
cache_group_specs: tuple[CacheGroupSpec, ...],
token_capacity: int | None = None,
enable_memory_saver: bool = False,
backup_device_kv: bool | None = None,
storage_plan: CacheStoragePlan | None = None,
):
if not cache_group_specs:
@@ -142,6 +143,15 @@ class CacheArena:
)
self.plan = plan
self.device = device
if (
enable_memory_saver
and str(device).split(":", 1)[0] == "npu"
and backup_device_kv is None
):
raise ValueError(
"An enabled Ascend saver requires the target KV backup policy"
)
self.backup_device_kv = bool(backup_device_kv)
# Materialize immutable byte geometry at setup, not on first hand-out.
# zero_blocks and copy_blocks ship only page ids per call; each group's
# field table (page-0 offset, page stride, payload bytes) lives on the
@@ -153,7 +163,7 @@ class CacheArena:
enable=enable_memory_saver, device=device
)
self._zero_field_tables: dict[str, tuple[int, torch.Tensor, int]] = {}
with self.memory_saver_adapter.named_region("cache_transfer"):
with self.memory_saver_adapter.named_region("cache_layout"):
for group in plan.groups:
page_count, fields = plan.page_field_layout(group.group_id)
for base, stride, size in fields:
@@ -173,9 +183,7 @@ class CacheArena:
spec.group_id: spec for spec in cache_group_specs
}
# The payload and geometry share an adapter but have distinct lifetimes.
# Tag as "kv_cache", no CPU backup: cache bytes are discarded on
# sleep and rebuilt after wake (paging overwrites; clear() zeros the
# remapped pages).
# Preserve bytes only when the target can resume its original weights.
self.storage_plan = storage_plan or plan_cache_storage(
plan,
cache_group_specs,
@@ -193,8 +201,10 @@ class CacheArena:
self.regions: dict[str, torch.Tensor] = {}
# Only device regions live in the memory saver's pool; pinned Host
# regions (sparse offload history) are ordinary Host allocations and
# stay mapped across sleep. Wake zeroes both (clear()).
with self.memory_saver_adapter.region(tag="kv_cache", enable_cpu_backup=False):
# stay mapped across sleep. An invalidated image clears both on wake.
with self.memory_saver_adapter.region(
tag="kv_cache", enable_cpu_backup=self.backup_device_kv
):
for region in self.storage_plan.regions:
host = region.placement == "host"
self.regions[region.region_id] = torch.zeros(
@@ -23,6 +23,7 @@ def create_cache_arena(
*,
device: str,
enable_memory_saver: bool,
backup_device_kv: bool | None = None,
) -> CacheArena:
"""Allocate the one arena every compute view of this spec shares."""
return CacheArena(
@@ -31,6 +32,7 @@ def create_cache_arena(
cache_group_specs=spec.cache_group_specs,
token_capacity=spec.token_capacity,
enable_memory_saver=enable_memory_saver,
backup_device_kv=backup_device_kv,
storage_plan=spec.storage_plan,
)
@@ -71,7 +71,7 @@ class HybridGlm53FlashTokenToKVPool(HybridKDATokenToKVPool):
workspace = getattr(self.arena, attribute, None)
if workspace is None:
with self.arena.memory_saver_adapter.region(
tag="kv_cache", enable_cpu_backup=False
tag="kv_cache", enable_cpu_backup=self.arena.backup_device_kv
):
storage = torch.zeros(
(
@@ -1644,6 +1644,7 @@ def create_attn_components(
spec,
device=config.device,
enable_memory_saver=enable_memory_saver,
backup_device_kv=server_args.backup_device_kv,
)
backend, pool = _create_target_components(
backend=reuse_target_backend,
@@ -35,7 +35,7 @@ except ModuleNotFoundError as exc:
if exc.name != "torch_npu_memory_saver":
raise
raise ModuleNotFoundError(
"Install Ascend Memory Saver with 'python -m pip install torch-npu-memory-saver==0.1.5'.",
"Install Ascend Memory Saver with 'python -m pip install torch-npu-memory-saver==0.1.6'.",
name=exc.name,
) from exc
@@ -87,10 +87,14 @@ class AscendMemorySaverAdapter(NpuMemorySaver, TorchMemorySaverAdapter):
@contextmanager
def named_region(self, name: str):
"""Back up persistent owners while reusing their active allocator scope."""
if name == "cache_transfer":
# Frozen rounds may copy KV with weights asleep. ACL graph sleep also
# sleeps KV; its backup allocator preserves these tables across wake.
key = PoolKey("acl_graph", AllocationPolicy.CPU_BACKUP, "cache_transfer")
if name == "cache_layout":
# Immutable geometry lives in PTA's ordinary runtime allocator. REMAIN
# creates no MemPool and the table stays usable while other tags sleep.
key = PoolKey("kv_cache", AllocationPolicy.REMAIN, name)
elif name == "cache_transfer":
# Transfer scratch follows KV availability. Share the backup allocator
# with backed-up KV; its tables must survive even when payload is discarded.
key = PoolKey("kv_cache", AllocationPolicy.CPU_BACKUP, "kv_cache")
else:
key = PoolKey(
"weights", AllocationPolicy.CPU_BACKUP, _NAMED_REGION_POOLS[name]
@@ -112,7 +116,7 @@ class AscendMemorySaverAdapter(NpuMemorySaver, TorchMemorySaverAdapter):
"""Permit KV copies during weights-only sleep and reject uncertain mappings."""
state = self._state().state # Also checks native allocator callback failures.
with state.lock:
if state.failed or state.paused.intersection(("kv_cache", "acl_graph")):
if state.failed or "kv_cache" in state.paused:
state.assert_active()
@contextmanager
@@ -3050,6 +3050,15 @@ class ServerArgs:
"one request"
)
@property
def backup_device_kv(self) -> bool:
"""An Ascend CPU-backed target can reuse its prefixes across sleep."""
return (
self.device == "npu"
and self.enable_memory_saver
and self.weight_memory_policy == "cpu_backup"
)
def validate_weight_memory_policy(self):
"""Memory saving chooses its weight semantics explicitly."""
if self.weight_memory_policy not in (None, "cpu_backup", "discard"):
@@ -72,6 +72,7 @@ def _non_expandable_allocation():
_NAMED_REGION_POOLS = {
"cache_layout": "persistent_buffers",
"cache_transfer": "persistent_buffers",
"executor_inputs": "persistent_buffers",
"runtime_states": "persistent_buffers",
+14 -4
View File
@@ -2049,7 +2049,11 @@ def test_ascend_weights_only_sleep_keeps_cache_pages_usable():
field = CacheFieldSpec("data", "kv.0", (16, 8), "float16")
layout = pack([(group, (field,))], prefix_granularity=16)
arena = CacheArena(
layout.bind(4), "npu", cache_group_specs=(group,), enable_memory_saver=True
layout.bind(4),
"npu",
cache_group_specs=(group,),
enable_memory_saver=True,
backup_device_kv=True,
)
saver = arena.memory_saver_adapter
with saver.region(tag="weights", enable_cpu_backup=True):
@@ -2085,10 +2089,16 @@ def test_ascend_weights_only_sleep_keeps_cache_pages_usable():
with pytest.raises(RuntimeError, match="kv_cache"):
handle.execute(plan, None, cache_ops=())
saver.pause("acl_graph")
# Direct device calls can bypass the host's graph-before-KV wake check.
saver.resume("kv_cache")
with pytest.raises(RuntimeError, match="acl_graph"):
handle.execute(plan, None, cache_ops=())
# The copy uses resident geometry and restored KV even with the graph asleep.
torch.testing.assert_close(
pages[2].cpu(), torch.full((16, 8), 5, dtype=pages.dtype)
)
pages[1].fill_(9)
handle.execute(plan, None, cache_ops=())
torch.testing.assert_close(
pages[2].cpu(), torch.full((16, 8), 9, dtype=pages.dtype)
)
handle.resume_weights(saver)
finally:
saver.resume()
@@ -257,7 +257,15 @@ def test_graph_rng_storage_survives_sleep_before_graph_replay(
@pytest.mark.parametrize(
"name", ["executor_inputs", "runtime_states", "attention_state", "workspace"]
"name",
[
"executor_inputs",
"runtime_states",
"attention_state",
"cache_layout",
"cache_transfer",
"workspace",
],
)
def test_named_buffers_preserve_contents_and_addresses_across_discard(
memory, buffers, name
@@ -301,7 +309,15 @@ def test_named_buffer_scope_is_restored_after_failure(memory, buffers):
@pytest.mark.parametrize(
"name", ["executor_inputs", "runtime_states", "attention_state", "workspace"]
"name",
[
"executor_inputs",
"runtime_states",
"attention_state",
"cache_layout",
"cache_transfer",
"workspace",
],
)
def test_disabled_named_region_leaves_allocations_resident(memory, buffers, name):
saver = adapter.TorchMemorySaverAdapter.create(enable=False, device="cuda")
@@ -88,6 +88,7 @@ pub struct ControlConfig {
/// The regions this engine can release (`nccl` needs an NCCL that can
/// suspend its communicators).
pub memory_regions: Vec<String>,
pub backup_device_kv: bool,
/// With a cache shared beyond this engine -- the L3 storage tier or
/// peer prefix sharing -- the checkpoint identity its pages are named
/// under (`--weight-version`); `None` without one.
@@ -1034,13 +1035,6 @@ impl Controls {
if !not_released.is_empty() {
return Err(format!("tags not released: {not_released:?}"));
}
// On Ascend, the graph tag backs up the tables used to copy resident KV.
if self.released.iter().any(|tag| tag == "acl_graph")
&& tags.iter().any(|tag| tag == "kv_cache")
&& !tags.iter().any(|tag| tag == "acl_graph")
{
return Err("resume acl_graph before or together with kv_cache".to_owned());
}
Ok(tags)
}
@@ -1172,6 +1166,7 @@ mod tests {
Controls::new(ControlConfig {
memory_saver,
replica_memory_transitions: false,
backup_device_kv: false,
memory_regions: vec!["kv_cache".to_owned(), "weights".to_owned()],
shared_weight_version: None,
allow_reload_forward: true,
@@ -1311,6 +1306,7 @@ mod tests {
let mut off = Controls::new(ControlConfig {
memory_saver: false,
replica_memory_transitions: false,
backup_device_kv: false,
memory_regions: Vec::new(),
shared_weight_version: None,
allow_reload_forward: false,
@@ -1355,6 +1351,7 @@ mod tests {
let mut l3 = Controls::new(ControlConfig {
memory_saver: false,
replica_memory_transitions: false,
backup_device_kv: false,
memory_regions: Vec::new(),
shared_weight_version: Some("v1".to_owned()),
allow_reload_forward: false,
@@ -1392,6 +1389,7 @@ mod tests {
let mut controls = Controls::new(ControlConfig {
memory_saver: false,
replica_memory_transitions: false,
backup_device_kv: false,
memory_regions: Vec::new(),
shared_weight_version: Some("B".to_owned()),
allow_reload_forward: false,
@@ -2414,8 +2414,13 @@ impl<D: DataPlane, F: Frontend> EventLoop<D, F> {
// An invalid request has no descriptor. Share readiness and exact
// matching in one exchange, before any rank changes its pause state.
let descriptor = match &prepared {
Ok(tags) => serde_json::to_vec(&(call.release, &call.id, tags))
.expect("memory call descriptor contains only strings and a boolean"),
Ok(tags) => serde_json::to_vec(&(
call.release,
&call.id,
tags,
self.config.controls.backup_device_kv,
))
.expect("memory call descriptor contains only strings and a boolean"),
Err(_) => Vec::new(),
};
let (mesh, domain) = self.ranks.memory_domain();
@@ -3013,7 +3018,10 @@ impl<D: DataPlane, F: Frontend> EventLoop<D, F> {
if !all_paused {
return Ok(());
}
let clears_kv = tags.iter().any(|tag| tag == "kv_cache");
// Backed-up pages still own their L1 prefix entries. Weight loads
// flush those entries before the first parameter write, even if KV sleeps.
let clears_kv =
!self.config.controls.backup_device_kv && tags.iter().any(|tag| tag == "kv_cache");
if self.config.controls.replica_memory_transitions {
// Weight and cache prerequisites may have changed while draining.
let tags = tags.clone();
@@ -448,6 +448,7 @@ fn round_loop_config(shape: &RoundShape, pages: usize) -> LoopConfig {
request_token_history: false,
request_token_history_lookback: None,
controls: ControlConfig {
backup_device_kv: false,
memory_saver: false,
replica_memory_transitions: false,
memory_regions: Vec::new(),
@@ -190,6 +190,7 @@ fn loop_config(in_flight_depth: usize) -> LoopConfig {
request_token_history: false,
request_token_history_lookback: None,
controls: ControlConfig {
backup_device_kv: false,
memory_saver: true,
replica_memory_transitions: false,
memory_regions: vec!["kv_cache".into(), "weights".into()],
@@ -1791,6 +1791,7 @@ struct Setup {
replica_memory_transitions: bool,
/// Advertise the Ascend graph region beside the shared KV arena.
ascend_graph: bool,
backup_device_kv: bool,
/// A rank that fails after memory release begins.
memory_release_failure_rank: Option<usize>,
/// A rank that fails after memory resume begins.
@@ -1862,6 +1863,7 @@ fn loop_config(in_flight_depth: usize, pipeline: bool, setup: &Setup) -> LoopCon
request_token_history: setup.request_token_history,
request_token_history_lookback: setup.request_token_history_lookback,
controls: ControlConfig {
backup_device_kv: setup.backup_device_kv,
memory_saver: true,
replica_memory_transitions: setup.replica_memory_transitions,
memory_regions,
@@ -20,6 +20,39 @@
use super::*;
#[tokio::test(flavor = "multi_thread")]
async fn only_a_backed_up_arena_keeps_its_prefix_after_independent_kv_wake() {
for backup_device_kv in [false, true] {
let engine = start_ranks_with(
Layout::Tp(2),
1,
Tiers::DeviceOnly,
Setup {
replica_memory_transitions: true,
ascend_graph: true,
backup_device_kv,
..Setup::default()
},
)
.await;
let warm = run(&engine.client, request("warm", 65, budget(2))).await;
assert_eq!(warm.last().unwrap().cached_tokens, 0);
for (release, tag) in [
(true, "acl_graph"),
(false, "kv_cache"),
(false, "acl_graph"),
] {
let result = control(&engine, memory_request(release, Some(&[tag]), None)).await;
assert!(result.iter().all(|(_, ok)| *ok), "{result:?}");
}
let next = run(&engine.client, request("reuse", 65, budget(2))).await;
assert_eq!(
next.last().unwrap().cached_tokens,
if backup_device_kv { 64 } else { 0 }
);
}
}
#[tokio::test(flavor = "multi_thread")]
async fn a_refused_load_preserves_l3_publication_until_the_same_version_retry() {
async fn publication(engine: &Engine, wait: bool) -> GetSharedPrefixPublicationReqOutput {
@@ -206,8 +206,14 @@ fn graph_wake_preserves_the_backend_kv_sleeping_state() {
[("ReleaseMemoryOccupationReqOutput", true)]
);
if graph == "acl_graph" {
assert!(controls.resume_tags(Some(&["kv_cache".into()])).is_err());
assert_eq!(controls.resume_tags(None).unwrap(), ["acl_graph", "kv_cache"]);
assert_eq!(
controls.resume_tags(Some(&["kv_cache".into()])).unwrap(),
["kv_cache"]
);
assert_eq!(
controls.resume_tags(None).unwrap(),
["acl_graph", "kv_cache"]
);
}
for tag in if graph == "acl_graph" {
vec![graph, "kv_cache"]
@@ -614,6 +614,7 @@ impl HostConfig {
memory_saver: config.getattr("memory_saver")?.extract()?,
replica_memory_transitions,
memory_regions: config.getattr("memory_regions")?.extract()?,
backup_device_kv: config.getattr("backup_device_kv")?.extract()?,
// With L3, its namespace's weight version; peer sharing,
// which excludes L3, sets its own in `serve`.
shared_weight_version: l3.as_ref().map(|l3| l3.weight_version.clone()),
@@ -138,6 +138,7 @@ class CpuConfig:
startup_requests: bool = False
memory_saver: bool = False
memory_regions: tuple = ()
backup_device_kv: bool = False
allow_reload_forward: bool = False
l3: object = None
disk: object = None
@@ -1,2 +1,2 @@
# Ascend native operators are supplied by tokenspeed-kernel-npu and flash_ops.
torch-npu-memory-saver==0.1.5
torch-npu-memory-saver==0.1.6
+1 -1
View File
@@ -220,7 +220,7 @@ def test_npu_install_requires_use_ascend_provider(monkeypatch) -> None:
requirements = _requirements_by_name(install_requires)
assert {"torch", "triton-ascend", "apache-tvm-ffi"} <= requirements.keys()
assert str(requirements["triton-ascend"].specifier) == "==3.2.1"
assert str(requirements["torch-npu-memory-saver"].specifier) == "==0.1.5"
assert str(requirements["torch-npu-memory-saver"].specifier) == "==0.1.6"
assert not any(
name.startswith("nvidia-")
or name