Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ metadata:
huawei.com/Ascend910B: "1"
# if you don't specify Ascend910B-memory, it will use a whole NPU.
huawei.com/Ascend910B-memory: "4096"
huawei.com/Ascend910B-core: "40"
```

For more examples, see [examples](https://github.com/Project-HAMi/ascend-device-plugin/tree/main/examples)

### Soft Slicing Configuration (HAMi)

Use the annotation below whenever you intend **soft** slicing; omitting it keeps **template-based vNPU** behavior (see the note under [Usage in HAMi](#usage-in-hami)).
Use the annotation below whenever you intend **soft** slicing; omitting it keeps **template-based vNPU** behavior (see the note under [Usage in HAMi](#usage-in-hami)). Soft-sliced workloads should request both **memory** and **core** resources; if only memory is requested, memory may be calculated by hard-slicing template matching, so the actual allocated value may be greater than or equal to the requested value instead of strictly equal to it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the if only memory is requested, memory may be calculated by hard-slicing template matching, xxx

Memory allocation is handled by the scheduler. The device-plugin merely transmits the data specified in the annotations to the pod via environment variables. Additionally, you resolved this problem in Project-HAMi/HAMi#2024


```yaml
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ devices:

### 软切分配置 (HAMi)

需要 **软切分** 时请显式加上下文中的注解;不加则仍为 **模板硬切分 vNPU**(与上一节「在 HAMi 中使用」中的说明一致)。
需要 **软切分** 时请显式加上下文中的注解;不加则仍为 **模板硬切分 vNPU**(与上一节「在 HAMi 中使用」中的说明一致)。软切分任务应同时申请**显存**和**算力**资源;如果只申请显存,显存可能按硬切分模板匹配方式计算,实际分配值大于或等于申请值,而不是严格等于申请值。

```yaml
apiVersion: v1
Expand Down
Loading