You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-32Lines changed: 36 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
3
3
## Introduction
4
4
5
-
This Ascend device plugin is implemented for [HAMi](https://github.com/Project-HAMi/HAMi) scheduling.
5
+
This Ascend device plugin is implemented for [HAMi](https://github.com/Project-HAMi/HAMi)and [volcano](https://github.com/volcano-sh/volcano)scheduling.
6
6
7
-
Memory slicing is supported based on virtualization template, lease available template is automatically used. For detailed information, check [templeate](./config.yaml)
7
+
Memory slicing is supported based on virtualization template, lease available template is automatically used. For detailed information, check [template](./ascend-device-configmap.yaml)
during HAMi installation. For more details, see 'devices' section in values.yaml.
34
29
35
-
```yaml
36
-
devices:
37
-
ascend:
38
-
enabled: true
39
-
image: "ascend-device-plugin:master"
40
-
imagePullPolicy: IfNotPresent
41
-
extraArgs: []
42
-
nodeSelector:
43
-
ascend: "on"
44
-
tolerations: []
45
-
resources:
46
-
- huawei.com/Ascend910A
47
-
- huawei.com/Ascend910A-memory
48
-
- huawei.com/Ascend910B
49
-
- huawei.com/Ascend910B-memory
50
-
- huawei.com/Ascend310P
51
-
- huawei.com/Ascend310P-memory
52
30
```
31
+
kubectl label node {ascend-node} ascend=on
32
+
```
53
33
54
-
Note that resources here(hawei.com/Ascend910A,huawei.com/Ascend910B,...) is managed in hami-scheduler-device configMap. It defines three different templates(910A,910B,310P).
55
-
56
-
label your NPU nodes with 'ascend=on'
34
+
### Deploy ConfigMap
57
35
58
36
```
59
-
kubectl label node {ascend-node} ascend=on
37
+
kubectl apply -f ascend-device-configmap.yaml
60
38
```
61
39
62
-
Deploy ascend-device-plugin by running
40
+
### Deploy `ascend-device-plugin`
63
41
64
42
```bash
65
43
kubectl apply -f ascend-device-plugin.yaml
66
44
```
67
45
46
+
If scheduling Ascend devices in HAMi, simply set `devices.ascend.enabled` to true when deploying HAMi, and the ConfigMap and `ascend-device-plugin` will be automatically deployed. refer https://github.com/Project-HAMi/HAMi/blob/master/charts/hami/README.md#huawei-ascend
68
47
69
48
## Usage
70
49
71
-
You can allocate a slice of NPU by specifying both resource number and resource memory. For more examples, see [examples](./examples/)
50
+
To exclusively use an entire card or request multiple cards, you only need to set the corresponding resourceName. If multiple tasks need to share the same NPU, you need to set the corresponding resource request to 1 and configure the appropriate ResourceMemoryName.
51
+
52
+
### Usage in HAMi
72
53
73
54
```yaml
74
55
...
@@ -81,3 +62,26 @@ You can allocate a slice of NPU by specifying both resource number and resource
81
62
# if you don't specify Ascend910B-memory, it will use a whole NPU.
82
63
huawei.com/Ascend910B-memory: "4096"
83
64
```
65
+
For more examples, see [examples](./examples/)
66
+
67
+
### Usage in volcano
68
+
69
+
Volcano must be installed prior to usage, for more information see [here](https://github.com/volcano-sh/volcano/tree/master/docs/user-guide/how_to_use_vnpu.md)
0 commit comments