Skip to content

docs: clarify Ascend soft slicing resource requests#102

Open
fyuan1316 wants to merge 1 commit into
Project-HAMi:mainfrom
fyuan1316:docs/soft-slice-core-requirement
Open

docs: clarify Ascend soft slicing resource requests#102
fyuan1316 wants to merge 1 commit into
Project-HAMi:mainfrom
fyuan1316:docs/soft-slice-core-requirement

Conversation

@fyuan1316

@fyuan1316 fyuan1316 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR clarifies the recommended resource request pattern for Ascend soft slicing.

When a workload is intended to use huawei.com/vnpu-mode: hami-core, it should request both memory and core resources. If only memory is requested, memory may be calculated by hard-slicing template matching, so the actual allocated value may be greater than or equal to the requested value instead of strictly equal to it.

Changes

  • Add huawei.com/Ascend910B-core to the soft-slicing example.
  • Clarify the memory/core requirement in both English and Chinese README files.
  • Explain the user-visible behavior for memory-only requests.

Fixes #101

Test

  • git diff --check

Summary by CodeRabbit

  • Documentation
    • Clarified the soft-slicing example formatting in the English README so the resource limit appears clearly within the code block.
    • Improved the surrounding section layout for more consistent markdown rendering.
    • Updated the Chinese README with a clearer note that soft-slicing workloads should request both memory and compute resources to get the expected allocation behavior.

Signed-off-by: Yuan Fang <yuanfang@alauda.io>
@hami-robot

hami-robot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fyuan1316
Once this PR has been reviewed and has the lgtm label, please assign archlitchi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot hami-robot Bot added the size/XS label Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f4d13d92-8f3b-40cd-8187-de29d020423a

📥 Commits

Reviewing files that changed from the base of the PR and between 6f1113f and d743be0.

📒 Files selected for processing (2)
  • README.md
  • README_cn.md

📝 Walkthrough

Walkthrough

Documentation-only update clarifying Ascend soft-slicing usage. README.md's YAML example now includes the huawei.com/Ascend910B-core limit alongside memory, with surrounding text reflowed. README_cn.md adds a note that soft-slicing requires requesting both memory and compute resources.

Changes

Soft Slicing Documentation Update

Layer / File(s) Summary
English usage example and section text
README.md
Adds the huawei.com/Ascend910B-core limit to the soft-slicing YAML example and reflows the "Soft Slicing Configuration (HAMi)" section text accordingly.
Chinese requirement clarification
README_cn.md
Adds a sentence stating soft-slicing workloads must request both memory and compute resources, otherwise memory-only requests may be allocated per the hard-slice template.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A rabbit hops through docs so neat,
Adding cores to make it complete,
Memory alone was a sneaky trap,
Now the README fills that gap,
Hop, hop, hooray for clarity's feat! 🐇📄

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the doc update about Ascend soft slicing resource requests.
Linked Issues check ✅ Passed The README changes match the issue: they clarify memory-plus-core requests and note memory may exceed the requested value.
Out of Scope Changes check ✅ Passed The PR only updates the two README files to clarify existing soft-slicing documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Comment thread README.md
### Soft Slicing Configuration (HAMi)

Use the annotation below whenever you intend **soft** slicing; omitting it keeps **template-based vNPU** behavior (see the note under [Usage in HAMi](#usage-in-hami)).
Use the annotation below whenever you intend **soft** slicing; omitting it keeps **template-based vNPU** behavior (see the note under [Usage in HAMi](#usage-in-hami)). Soft-sliced workloads should request both **memory** and **core** resources; if only memory is requested, memory may be calculated by hard-slicing template matching, so the actual allocated value may be greater than or equal to the requested value instead of strictly equal to it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

delete the if only memory is requested, memory may be calculated by hard-slicing template matching, xxx

Memory allocation is handled by the scheduler. The device-plugin merely transmits the data specified in the annotations to the pod via environment variables. Additionally, you resolved this problem in Project-HAMi/HAMi#2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify memory and core requirements for Ascend soft slicing

2 participants