Skip to content

feat(runtime): Add offset device copy wrapper - #2164

Closed
high-cloud wants to merge 1 commit into
hw-native-sys:mainfrom
high-cloud:agent/distributed-copy-to-offset
Closed

feat(runtime): Add offset device copy wrapper#2164
high-cloud wants to merge 1 commit into
hw-native-sys:mainfrom
high-cloud:agent/distributed-copy-to-offset

Conversation

@high-cloud

Copy link
Copy Markdown
Contributor

Summary

  • Add DistributedWorker.copy_to_offset for H2D copies into an offset of a live device allocation.
  • Forward the allocation base and byte offset separately to the simpler orchestrator.
  • Document the helper on DistributedWorker and cover its argument forwarding with a unit test.

Motivation

Simpler validates device-pointer provenance and rejects interior pointers passed through copy_to.
Callers updating a slice of a persistent allocation therefore need an explicit base-plus-offset API.
This wrapper exposes that API to PyPTO and unblocks offset cache-page updates in serving workloads.

Dependency

Validation

  • cmake --build build --parallel
  • python -m pytest tests/ut/runtime/test_distributed_worker.py -n auto --maxprocesses 8 -q: 104 passed
  • PyPTO pre-commit checks on the changed files: passed, including Ruff and Pyright
  • Full unit-suite attempt: 7772 passed, 2 skipped; 11 failures and 4 setup errors were caused by the locally installed _task_interface predating the simpler source-tree build stamp

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 32356e26-5296-4b44-a145-f7b96b85b56a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

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

@high-cloud

Copy link
Copy Markdown
Contributor Author

Closing as superseded by the revised simpler #1538, which fixes range validation in the existing copy_to() API. PyPTO no longer needs a copy_to_offset wrapper or public API expansion.

@high-cloud high-cloud closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant