Skip to content

Commit 978d066

Browse files
author
houyuxi
committed
fix(hygon): corrected a number of documentation errors
1. Replace the Cambricon document that was incorrectly placed under the hygon category 2. Translate English comments in code blocks in the Chinese documents into Chinese 3. Add missing yaml language specifiers to the code block 4. Add % postfix to the pod contaienr device cores resource request Signed-off-by: houyuxi <[email protected]>
1 parent 61af9fa commit 978d066

File tree

12 files changed

+36
-42
lines changed

12 files changed

+36
-42
lines changed

docs/userguide/Hygon-device/examples/allocate-core-and-memory.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ title: Allocate device core and memory resource
44

55
## Allocate device core and memory to container
66

7-
To allocate a certain part of device core resource, you need only to assign the `hygon.com/dcucores` and `hygon.com/dcumem` along with the number of cambricon DCUs you requested in the container using `hygon.com/dcunum`
7+
To allocate a certain part of device core resource, you need only to assign the `hygon.com/dcucores` and `hygon.com/dcumem` along with the number of hygon DCUs you requested in the container using `hygon.com/dcunum`
88

9-
```
9+
```yaml
1010
apiVersion: v1
1111
kind: Pod
1212
metadata:
@@ -23,5 +23,5 @@ spec:
2323
limits:
2424
hygon.com/dcunum: 1 # requesting a GPU
2525
hygon.com/dcumem: 2000 # each dcu require 2000 MiB device memory
26-
hygon.com/dcucores: 15 # each dcu use 15 device cores
26+
hygon.com/dcucores: 15 # each dcu use 15% device cores
2727
```

docs/userguide/Hygon-device/examples/allocate-exclusive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Allocate exclusive device
44

55
## Allocate exclusive device
66

7-
To allocate a whole cambricon device, you need to only assign `hygon.com/dcunum` without other fields.
7+
To allocate a whole hygon DCU device, you need to only assign `hygon.com/dcunum` without other fields.
88

99
```
1010
apiVersion: v1

docs/userguide/Hygon-device/specify-device-core-usage.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ title: Allocate device core usage
44

55
## Allocate device core to container
66

7-
Allocate a percentage of device core resources by specify resource `cambricon.com/mlu.smlu.vcore`.
8-
Optional, each unit of `cambricon.com/mlu.smlu.vcore` equals to 1% device cores.
7+
Allocate a percentage of device core resources by specify resource `hygon.com/dcucores`.
8+
Optional, each unit of `hygon.com/dcucores` equals to 1% device cores.
99

10-
```
10+
```yaml
1111
resources:
1212
limits:
13-
cambricon.com/vmlu: 1 # requesting 1 MLU
14-
cambricon.com/mlu.smlu.vcore: "10" # Each MLU contains 10% device cores
13+
hygon.com/dcunum: 1 # requesting 1 DCU
14+
hygon.com/dcucores: 15 # Each DCU allocates 15% device cores.
1515
```
16-
17-
> **NOTICE:** *Depending on the parameters of cambricon-device-plugin, resource name can be `cambricon.com/mlu370.smlu.vcore` or other types*

docs/userguide/Hygon-device/specify-device-memory-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Allocate device memory
77
Allocate a percentage size of device memory by specify resources such as `hygon.com/dcumem`.
88
Optional, Each unit of `hygon.com/dcumem` equals to 1M device memory.
99

10-
```
10+
```yaml
1111
resources:
1212
limits:
1313
hygon.com/dcunum: 1 # requesting 1 DCU

i18n/zh/docusaurus-plugin-content-docs/current/userguide/Hygon-device/enable-hygon-dcu-sharing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ spec:
4141
command: ["sleep","infinity"]
4242
resources:
4343
limits:
44-
hygon.com/dcunum: 1 # requesting a GPU
45-
hygon.com/dcumem: 2000 # each dcu require 2000 MiB device memory
46-
hygon.com/dcucores: 60 # each dcu use 60% of total compute cores
44+
hygon.com/dcunum: 1 # 请求一个 DCU
45+
hygon.com/dcumem: 2000 # 每个 DCU 包含 2000M 设备内存
46+
hygon.com/dcucores: 60 # 每个 DCU 分配 15% 的设备核心
4747

4848
```
4949

i18n/zh/docusaurus-plugin-content-docs/current/userguide/Hygon-device/examples/allocate-core-and-memory.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ translated: true
55

66
## 为容器分配设备核心和内存
77

8-
要分配设备核心资源的某一部分,您只需在容器中使用 `hygon.com/dcunum` 请求的 cambricon DCU 数量,并分配 `hygon.com/dcucores``hygon.com/dcumem`
8+
要分配设备核心资源的某一部分,您只需在容器中使用 `hygon.com/dcunum` 请求的海光 DCU 数量,并分配 `hygon.com/dcucores``hygon.com/dcumem`
99

10-
```
10+
```yaml
1111
apiVersion: v1
1212
kind: Pod
1313
metadata:
@@ -22,7 +22,7 @@ spec:
2222
command: ["sleep","infinity"]
2323
resources:
2424
limits:
25-
hygon.com/dcunum: 1 # 请求一个 GPU
26-
hygon.com/dcumem: 2000 # 每个 dcu 需要 2000 MiB 设备内存
27-
hygon.com/dcucores: 15 # 每个 dcu 使用 15 个设备核心
25+
hygon.com/dcunum: 1 # 请求一个 DCU
26+
hygon.com/dcumem: 2000 # 每个 DCU 需要 2000 MiB 设备内存
27+
hygon.com/dcucores: 15 # 每个 DCU 使用 15% 个设备核心
2828
```

i18n/zh/docusaurus-plugin-content-docs/current/userguide/Hygon-device/examples/allocate-exclusive.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ translated: true
55

66
## 分配独占设备
77

8-
要分配整个寒武纪设备,您只需分配 `hygon.com/dcunum`,无需其他字段。
8+
要分配整个海光 DCU 设备,您只需分配 `hygon.com/dcunum`,无需其他字段。
99

10-
```
10+
```yaml
1111
apiVersion: v1
1212
kind: Pod
1313
metadata:
@@ -22,5 +22,5 @@ spec:
2222
command: ["sleep","infinity"]
2323
resources:
2424
limits:
25-
hygon.com/dcunum: 1 # 请求一个 GPU
25+
hygon.com/dcunum: 1 # 请求一个 DCU
2626
```

i18n/zh/docusaurus-plugin-content-docs/current/userguide/Hygon-device/specify-device-core-usage.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ translated: true
55

66
## 分配设备核心给容器
77

8-
通过指定资源 `cambricon.com/mlu.smlu.vcore` 来分配设备核心资源的百分比。
9-
可选项,每个 `cambricon.com/mlu.smlu.vcore` 单位等于设备核心的 1%。
8+
通过指定资源 `hygon.com/dcucores` 来分配设备核心资源的百分比。
9+
可选项,每个 `hygon.com/dcucores` 单位等于设备核心的 1%。
1010

11-
```
11+
```yaml
1212
resources:
1313
limits:
14-
cambricon.com/vmlu: 1 # 请求 1 个 MLU
15-
cambricon.com/mlu.smlu.vcore: "10" # 每个 MLU 包含 10% 的设备核心
14+
hygon.com/dcunum: 1 # 请求 1 个 DCU
15+
hygon.com/dcucores: 15 # 每个 DCU 分配 15% 的设备核心
1616
```
17-
18-
> **注意:** *根据 cambricon-device-plugin 的参数,资源名称可以是 `cambricon.com/mlu370.smlu.vcore` 或其他类型*

i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/userguide/Hygon-device/enable-hygon-dcu-sharing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ spec:
4141
command: ["sleep","infinity"]
4242
resources:
4343
limits:
44-
hygon.com/dcunum: 1 # requesting a GPU
45-
hygon.com/dcumem: 2000 # each dcu require 2000 MiB device memory
46-
hygon.com/dcucores: 60 # each dcu use 60% of total compute cores
44+
hygon.com/dcunum: 1 # 请求一个 DCU
45+
hygon.com/dcumem: 2000 # 每个 DCU 包含 2000M 设备内存
46+
hygon.com/dcucores: 60 # 每个 DCU 分配 15% 的设备核心
4747

4848
```
4949

i18n/zh/docusaurus-plugin-content-docs/version-v2.6.0/userguide/Hygon-device/examples/allocate-core-and-memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ translated: true
55

66
## 为容器分配设备核心和内存
77

8-
要分配设备核心资源的某一部分,您只需在容器中使用 `hygon.com/dcunum` 请求的 cambricon DCU 数量,并分配 `hygon.com/dcucores``hygon.com/dcumem`
8+
要分配设备核心资源的某一部分,您只需在容器中使用 `hygon.com/dcunum` 请求的海光 DCU 数量,并分配 `hygon.com/dcucores``hygon.com/dcumem`
99

1010
```
1111
apiVersion: v1

0 commit comments

Comments
 (0)