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
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ spec:

:::note

Each unit of `sgpu-memory` represents 512 MB of device memory. More examples are available in the [examples/mthreads folder](https://github.com/Project-HAMi/HAMi/tree/master/examples/mthreads/).
Each unit of `sgpu-memory` represents 512 MiB of device memory. More examples are available in the [examples/mthreads folder](https://github.com/Project-HAMi/HAMi/tree/master/examples/mthreads/).

:::
4 changes: 2 additions & 2 deletions docs/userguide/mthreads-device/specify-device-memory-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: Allocate device memory to container
sidebar_label: Allocate device memory
---

Allocate a percentage size of device memory by specifying resources such as `mthreads.com/sgpu-memory`. Optional, each unit of `mthreads.com/sgpu-memory` equals 512 MiB of device memory.
Allocate device memory by specifying the `mthreads.com/sgpu-memory` resource. This field is optional. Each unit of `mthreads.com/sgpu-memory` represents 512 MiB of device memory.

```yaml
resources:
limits:
mthreads.com/vgpu: 1 # requesting 1 GPU
mthreads.com/sgpu-memory: 32 # Each GPU contains 16G device memory
mthreads.com/sgpu-memory: 32 # 32 units x 512 MiB = 16 GiB of device memory
Comment on lines +6 to +12

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Document the integer, non-percentage contract consistently.

All eight changed notes define 512 MiB units but do not state that the resource value is an integer count, not a percentage. Apply consistent wording at every site:

  • docs/userguide/mthreads-device/specify-device-memory-usage.md#L6-L12: state that the value is an integer count of 512 MiB units, not a percentage.
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/specify-device-memory-usage.md#L7-L13: add the equivalent Chinese constraint.
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md#L7-L13: add the equivalent Chinese constraint.
  • versioned_docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md#L6-L12: state the English constraint.
  • versioned_docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L72-L72: state the English constraint.
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74: add the equivalent Chinese constraint.
  • docs/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L72-L72: state the English constraint.
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74: add the equivalent Chinese constraint.
📍 Affects 8 files
  • docs/userguide/mthreads-device/specify-device-memory-usage.md#L6-L12 (this comment)
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/specify-device-memory-usage.md#L7-L13
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md#L7-L13
  • versioned_docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md#L6-L12
  • versioned_docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L72-L72
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74
  • docs/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L72-L72
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/userguide/mthreads-device/specify-device-memory-usage.md` around lines 6
- 12, Document consistently that the mthreads.com/sgpu-memory resource value is
an integer count of 512 MiB units, not a percentage, in
docs/userguide/mthreads-device/specify-device-memory-usage.md lines 6-12,
versioned_docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md
lines 6-12, docs/userguide/mthreads-device/enable-mthreads-gpu-sharing.md line
72, and
versioned_docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md
line 72; add the equivalent Chinese wording in
i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/specify-device-memory-usage.md
lines 7-13,
i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md
lines 7-13,
i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md
line 74, and
i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md
line 74.

```
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:

:::note

每一单位的 sgpu-memory 代表 512M 的显存。
每一单位的 sgpu-memory 代表 512MiB 的显存。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the version-inappropriate examples links.

Both Chinese enablement documents retain a release-v2.6 link that returns 404. Use master for the current document and v2.9.0 for the versioned snapshot. The corresponding target paths are available. ()

  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74: update the adjacent Line 80 link to the master examples path.
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74: update the adjacent Line 80 link to the v2.9.0 examples path.

As per coding guidelines, external documentation links must be correct and use HTTPS where applicable.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...threads.com/sgpu-core: 8 ``` :::note 每一单位的 sgpu-memory 代表 512MiB 的显存。 ::: :::no...

(wa5)

📍 Affects 2 files
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74 (this comment)
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md`
at line 74, Update the adjacent examples link in
i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md
at lines 74-74 to use the HTTPS master examples path, and update the
corresponding link in
i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md
at lines 74-74 to use the HTTPS v2.9.0 examples path instead of release-v2.6.

Sources: Coding guidelines, MCP tools


:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ sidebar_label: 指定显存
translated: true
---

通过指定诸如 `mthreads.com/sgpu-memory` 之类的资源来分配设备显存的百分比大小。可选项,每个 `mthreads.com/sgpu-memory` 单位等于 512M 的设备显存。
通过指定 `mthreads.com/sgpu-memory` 资源来分配设备显存。可选项,每个 `mthreads.com/sgpu-memory` 单位代表 512MiB 的设备显存。

```yaml
resources:
limits:
mthreads.com/vgpu: 1 # 请求 1 个 GPU
mthreads.com/sgpu-memory: 32 # 每个 GPU 包含 16G 设备显存
mthreads.com/sgpu-memory: 32 # 32 个单位 x 512MiB = 16 GiB 设备显存
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ translated: true

:::

- 在安装 HAMi 时配置'devices.mthreads.enabled = true'参数
- 在安装 HAMi 时配置参数 `devices.mthreads.enabled=true`

```bash
helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag={your kubernetes version} --set devices.mthreads.enabled=true -n kube-system
helm install hami hami-charts/hami --set scheduler.kubeScheduler.image.tag={your kubernetes version} --set devices.mthreads.enabled=true -n kube-system
```

## 运行 GPU 任务
Expand Down Expand Up @@ -71,7 +71,7 @@ spec:

:::note

每一单位的 sgpu-memory 代表 512M 的显存。
每一单位的 sgpu-memory 代表 512MiB 的显存。

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ sidebar_label: 指定显存
translated: true
---

通过指定诸如 `mthreads.com/sgpu-memory` 之类的资源来分配设备显存的百分比大小。可选项,每个 `mthreads.com/sgpu-memory` 单位等于 512M 的设备显存。
通过指定 `mthreads.com/sgpu-memory` 资源来分配设备显存。可选项,每个 `mthreads.com/sgpu-memory` 单位代表 512MiB 的设备显存。

```yaml
resources:
limits:
mthreads.com/vgpu: 1 # 请求 1 个 GPU
mthreads.com/sgpu-memory: 32 # 每个 GPU 包含 16G 设备显存
mthreads.com/sgpu-memory: 32 # 32 个单位 x 512MiB = 16 GiB 设备显存
```
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ You can remove `mt-mutating-webhook` and `mt-gpu-scheduler` after installation (

:::

- set the 'devices.mthreads.enabled = true' when installing hami
- Set `devices.mthreads.enabled=true` when installing HAMi

```bash
helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag={your kubernetes version} --set devices.mthreads.enabled=true -n kube-system
helm install hami hami-charts/hami --set scheduler.kubeScheduler.image.tag={your kubernetes version} --set devices.mthreads.enabled=true -n kube-system
```

## Running Mthreads jobs
Expand Down Expand Up @@ -69,6 +69,6 @@ spec:

:::note

Each unit of `sgpu-memory` represents 512 MB of device memory. More examples are available in the [examples/mthreads folder](https://github.com/Project-HAMi/HAMi/tree/master/examples/mthreads/).
Each unit of `sgpu-memory` represents 512 MiB of device memory. More examples are available in the [examples/mthreads folder](https://github.com/Project-HAMi/HAMi/tree/master/examples/mthreads/).

:::
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: Allocate device memory to container
sidebar_label: Allocate device memory
---

Allocate a percentage size of device memory by specifying resources such as `mthreads.com/sgpu-memory`. Optional, each unit of `mthreads.com/sgpu-memory` equals 512 MiB of device memory.
Allocate device memory by specifying the `mthreads.com/sgpu-memory` resource. This field is optional. Each unit of `mthreads.com/sgpu-memory` represents 512 MiB of device memory.

```yaml
resources:
limits:
mthreads.com/vgpu: 1 # requesting 1 GPU
mthreads.com/sgpu-memory: 32 # Each GPU contains 16G device memory
mthreads.com/sgpu-memory: 32 # 32 units x 512 MiB = 16 GiB of device memory
```