Skip to content

Commit cd37c95

Browse files
committed
fix lint
Signed-off-by: wangli <[email protected]>
1 parent 2e7eeb5 commit cd37c95

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/source/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ user_guide/suppoted_features
4747
user_guide/supported_models
4848
user_guide/env_vars
4949
user_guide/additional_config
50+
user_guide/sleep_mode
5051
user_guide/graph_mode.md
5152
user_guide/quantization.md
5253
user_guide/release_notes

docs/source/user_guide/sleep_mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This module provides a custom memory allocator for Ascend NPUs using the [CANN](
1212
+-------------------+ +---------------------------+ +----------------------------+
1313
| Python Layer | -----> | CaMemAllocator (class) | ---> | C Extension (vllm_ascend_C)|
1414
+-------------------+ +---------------------------+ +----------------------------+
15-
⬇ Registers ⬇ Tracks & Tags ⬇ Calls into CANN
15+
⬇ Registers ⬇ Tracks & Tags ⬇ Calls into CANN
1616
init_module(malloc, free) pointer_to_data[ptr] = data aclrtMallocPhysical, aclrtMapMem, etc.
1717
```
1818

examples/offline_inference_sleep_mode_npu.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from vllm import LLM, SamplingParams
2323
from vllm.utils import GiB_bytes
2424

25-
2625
os.environ["VLLM_USE_V1"] = "1"
2726
os.environ["VLLM_USE_MODELSCOPE"] = "True"
2827
os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"
@@ -41,7 +40,9 @@
4140
llm.sleep(level=1)
4241

4342
free_npu_bytes_after_sleep, total = torch.npu.mem_get_info()
44-
print(f"Free memory after sleep: {free_npu_bytes_after_sleep / 1024 ** 3:.2f} GiB")
43+
print(
44+
f"Free memory after sleep: {free_npu_bytes_after_sleep / 1024 ** 3:.2f} GiB"
45+
)
4546
used_bytes = total - free_npu_bytes_after_sleep - used_bytes_baseline
4647
# now the memory usage should be less than the model weights
4748
# (0.5B model, 1GiB weights)

0 commit comments

Comments
 (0)