Skip to content

implement register_host_memory and unregister_host_memory for supa - #8537

Open
frozenleaves wants to merge 1 commit into
deepspeedai:masterfrom
frozenleaves:main-0910
Open

frozenleaves wants to merge 1 commit into
deepspeedai:masterfrom
frozenleaves:main-0910

Conversation

@frozenleaves

@frozenleaves frozenleaves commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

implement register_host_memory and unregister_host_memory for supa #8283

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6eb8d8ca00

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +65 to +66
def register_host_memory(self, address, num_bytes):
result = int(torch.supa.supart().supaHostRegister(address, num_bytes, 0))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add tests and documentation for the SUPA memory hooks

This adds externally observable SUPA host-memory registration without the required tests or documentation: tests/unit/v1/pin_memory/test_pin_memory.py covers only the CUDA runtime calls, while docs/code-docs/source/memory.rst still describes native device registration as CUDA-only. Consequently, an incorrect SUPA API name, signature, or error path can ship without coverage, and SUPA users are not told that native allocations can now support accelerator DMA. Add SUPA contract coverage and update the native registration documentation with this feature.

AGENTS.md reference: AGENTS.md:L23-L26

Useful? React with 👍 / 👎.

def random(self):
return torch.random

def register_host_memory(self, address, num_bytes):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the required DCO sign-off

This is a non-merge commit, but its commit message has no Signed-off-by trailer, so it violates the repository's mandatory DCO requirement and is liable to be rejected by the corresponding CI check. Recreate the commit with --signoff using the configured Git identity.

AGENTS.md reference: AGENTS.md:L6-L10

Useful? React with 👍 / 👎.

@delock

delock commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Hi @frozenleaves needs sign-off DCO, thanks!

Signed-off-by: frozenleaves <914814442@qq.com>
@delock
delock added this pull request to the merge queue Sep 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 16, 2026
@delock
delock added this pull request to the merge queue Sep 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants