-
Notifications
You must be signed in to change notification settings - Fork 97
docs(mthreads): fix device memory unit to 512 MiB and clarify sgpu-memory #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the mthreads plugin multiplies by 512 against what nvml reports, so the unit follows that report. did you confirm 512 MiB against a real node, or is it inferred from the 16G example? |
||
|
|
||
| ```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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
📍 Affects 8 files
🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mthreads/device.go only accepts 2, 4, 8, 16, 32, 64 and 96 for this field and errors otherwise. the wording here reads as if any integer works. worth naming the allowed set? |
||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ spec: | |
|
|
||
| :::note | ||
|
|
||
| 每一单位的 sgpu-memory 代表 512M 的显存。 | ||
| 每一单位的 sgpu-memory 代表 512MiB 的显存。 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
As per coding guidelines, external documentation links must be correct and use HTTPS where applicable. 🧰 Tools🪛 LanguageTool[uncategorized] ~74-~74: 数词与名词之间一般应存在量词,可能缺少量词。 (wa5) 📍 Affects 2 files
🤖 Prompt for AI AgentsSources: Coding guidelines, MCP tools |
||
|
|
||
| ::: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 的设备显存。 | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a space: 512 MiB, to match 16 GiB. |
||
| ```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 |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the imageTag to image.tag change is not in the pr body. intended? if the v2.9 chart still uses imageTag this breaks the snapshot.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch on image.tag. the same wrong flag is still in the v2.9.0 zh pages for iluvatar, online-installation and offline-installation. should they change in the same pass? |
||
| ``` | ||
|
|
||
| ## Running Mthreads jobs | ||
|
|
@@ -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/). | ||
|
|
||
| ::: | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the iluvatar page has the same MB for MiB slip, and iluvatar/device.go:38 says one vmemory unit is 256 MiB. should that page change in the same pass?