Skip to content

Commit

Permalink
update docs and yaml
Browse files Browse the repository at this point in the history
Signed-off-by: limengxuan <[email protected]>
  • Loading branch information
archlitchi committed Sep 14, 2024
1 parent aa1f98a commit 2ad8d8a
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Ascend Device Plugin

## 说明
## Introduction

基于[HAMi](https://github.com/Project-HAMi/HAMi)调度机制的ascend device plugin。
This Ascend device plugin is implemented for [HAMi](https://github.com/Project-HAMi/HAMi) scheduling.

支持基于显存调度,显存是基于昇腾的虚拟化模板来切分的,会找到满足显存需求的最小模板来作为容器的显存。
Memory slicing is supported based on virtualization template, lease available template is automatically used. For detailed information, check [templeate](https://github.com/Project-HAMi/HAMi/blob/master/charts/hami/device-spec/ascend-config.yaml)

启动容器依赖[ascend-docker-runtime](https://gitee.com/ascend/ascend-docker-runtime)
## Prequisites

## 编译
[ascend-docker-runtime](https://gitee.com/ascend/ascend-docker-runtime)

### 编译二进制文件
## Compile

```bash
make all
```

### 编译镜像
### Build

```bash
docker buildx build -t $IMAGE_NAME .
```

## 部署
## Deployment

由于和HAMi的一些依赖关系,部署集成在HAMi的部署中,修改HAMi chart values中的以下部分即可。
Due to dependencies with HAMi, the deployment is integrated into the HAMi deployment, you need to set 'devices.ascend.enabled=true'. The device-plugin is automaticaly deployed. For more details ,see 'devices' section in values.yaml.

```yaml
devices:
Expand All @@ -45,7 +45,8 @@ devices:
- huawei.com/Ascend310P-memory
```
## 使用
## Usage
```yaml
...
Expand Down
60 changes: 60 additions & 0 deletions README_cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Ascend Device Plugin

## 说明

基于[HAMi](https://github.com/Project-HAMi/HAMi)调度机制的ascend device plugin。

支持基于显存调度,显存是基于昇腾的虚拟化模板来切分的,会找到满足显存需求的最小模板来作为容器的显存。

启动容器依赖[ascend-docker-runtime](https://gitee.com/ascend/ascend-docker-runtime)

## 编译

### 编译二进制文件

```bash
make all
```

### 编译镜像

```bash
docker buildx build -t $IMAGE_NAME .
```

## 部署

由于和HAMi的一些依赖关系,部署集成在HAMi的部署中,修改HAMi chart values中的以下部分即可。

```yaml
devices:
ascend:
enabled: true
image: "ascend-device-plugin:master"
imagePullPolicy: IfNotPresent
extraArgs: []
nodeSelector:
ascend: "on"
tolerations: []
resources:
- huawei.com/Ascend910A
- huawei.com/Ascend910A-memory
- huawei.com/Ascend910B
- huawei.com/Ascend910B-memory
- huawei.com/Ascend310P
- huawei.com/Ascend310P-memory
```
## 使用
```yaml
...
containers:
- name: npu_pod
...
resources:
limits:
huawei.com/Ascend910B: "1"
# 不填写显存默认使用整张卡
huawei.com/Ascend910B-memory: "4096"
```

0 comments on commit 2ad8d8a

Please sign in to comment.