docs(mthreads): fix device memory unit to 512 MiB and clarify sgpu-memory - #708
docs(mthreads): fix device memory unit to 512 MiB and clarify sgpu-memory#708veyron-kairo wants to merge 1 commit into
Conversation
…mory The enable-mthreads-gpu-sharing page said each `sgpu-memory` unit is "512 MB" while the specify-device-memory page said "512 MiB". The device plugin multiplies the requested value by 512 and the example (32 -> 16Gi) only holds in MiB, so MiB is correct; make both pages consistent. Also drop the "percentage size of device memory" wording: the value is a plain integer count of 512-MiB units, not a percentage. Applied to the current (next) docs and the v2.9.0 released snapshot, in both English and Chinese, per the versioning workflow in AGENTS.md. Signed-off-by: Shridhar Panigrahi <198173519+veyron-kairo@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: veyron-kairo The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for project-hami ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Welcome @veyron-kairo! It looks like this is your first PR to Project-HAMi/website 🎉 |
📝 WalkthroughWalkthroughThe Mthreads documentation now uses 512 MiB units for ChangesMthreads documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with 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.
Inline comments:
In `@docs/userguide/mthreads-device/specify-device-memory-usage.md`:
- Around line 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.
In
`@i18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.md`:
- 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.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 57ddea82-5fcc-4dc5-8e9b-f8acd7c9e552
📒 Files selected for processing (8)
docs/userguide/mthreads-device/enable-mthreads-gpu-sharing.mddocs/userguide/mthreads-device/specify-device-memory-usage.mdi18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/enable-mthreads-gpu-sharing.mdi18n/zh/docusaurus-plugin-content-docs/current/userguide/mthreads-device/specify-device-memory-usage.mdi18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.mdi18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.mdversioned_docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.mdversioned_docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md
| 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 |
There was a problem hiding this comment.
🗄️ 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-L13i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md#L7-L13versioned_docs/version-v2.9.0/userguide/mthreads-device/specify-device-memory-usage.md#L6-L12versioned_docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L72-L72i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L74-L74docs/userguide/mthreads-device/enable-mthreads-gpu-sharing.md#L72-L72i18n/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.
| :::note | ||
|
|
||
| 每一单位的 sgpu-memory 代表 512M 的显存。 | ||
| 每一单位的 sgpu-memory 代表 512MiB 的显存。 |
There was a problem hiding this comment.
📐 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 themasterexamples 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 thev2.9.0examples 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
What this does
Fixes the device-memory unit and wording on the Moore Threads (mthreads) pages.
sgpu-memoryunit is512 MB, while the specify device memory page said512 MiB. The device plugin multiplies the requested value by 512, and the doc's own example (32→ 16Gi) only works out in MiB (32 × 512 MiB = 16384 MiB = 16 GiB). So512 MiBis correct — this makes both pages consistent.32 units x 512 MiB = 16 GiB).Scope
Applied to the current (
/docs/next) docs and thev2.9.0released snapshot, in both English and Chinese, following the "fixing the latest stable version" workflow inAGENTS.md(editdocs/+i18n/zh/.../current/, then sync the changed files intoversioned_docs/version-v2.9.0/and the zhversion-v2.9.0/mirror). Older frozen version snapshots were left untouched.Checks
npx prettier --checkandnpx markdownlintpass on the changed files. The change is in-line prose only (no links or structure changed).AI assistance disclosure
used chat gpt to make the pr description more fluent and enhanced my writing.
Summary by CodeRabbit
sgpu-memoryunits from 512 MB to 512 MiB.mthreads.com/sgpu-memoryis an optional memory allocation resource.