Skip to content

[OpenReg][Feat][Docs] Enrich OpenReg device management implementation and add focused documentation#165897

Closed
KarhouTam wants to merge 4 commits intopytorch:mainfrom
KarhouTam:openreg-device-management
Closed

[OpenReg][Feat][Docs] Enrich OpenReg device management implementation and add focused documentation#165897
KarhouTam wants to merge 4 commits intopytorch:mainfrom
KarhouTam:openreg-device-management

Conversation

@KarhouTam
Copy link
Contributor

@KarhouTam KarhouTam commented Oct 20, 2025

Summary

This PR enriches OpenReg device management codes and adds focused documentation.

Key Changes

  • Introduced device management documentation in device.md.
  • Updated OpenRegFunctions.h and OpenRegFunctions.cpp to use DeviceIndex and added error handling.
  • Implemented check_device_index function for validating device indices.
  • Enhanced Python bindings in Module.cpp for device management.
  • Added tests for invalid device index handling in test_device.py.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 20, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/165897

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit 901042c with merge base ce4f31f (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Oct 20, 2025
@KarhouTam
Copy link
Contributor Author

@pytorchbot label "module: openreg"

@KarhouTam KarhouTam changed the title [OpenReg][feat] Enrich OpenReg device management documentation and implement device functions [OpenReg][Feat][Docs] Enrich OpenReg device management implementation and add focused documentation Oct 21, 2025
@KarhouTam KarhouTam force-pushed the openreg-device-management branch from 79eb90b to dd0677e Compare October 25, 2025 09:51
@KarhouTam KarhouTam force-pushed the openreg-device-management branch 5 times, most recently from c6324fd to 46a0809 Compare October 30, 2025 10:01
@KarhouTam
Copy link
Contributor Author

Hi, @fffrog. I think this PR should be merged after the hook one: #165980 . Cause there must have conflict in index.md, but this PR is enoughly fine to be merged (at least all CI passed).

@KarhouTam
Copy link
Contributor Author

@pytorchbot label "ciflow/trunk"

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 12, 2025
Copy link
Collaborator

@fffrog fffrog left a comment

Choose a reason for hiding this comment

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

LGTM, thank you a lot.

Just some tiny nits.

…t device functions

- Introduced device management documentation in `device.md`.
- Updated `OpenRegFunctions.h` and `OpenRegFunctions.cpp` to use `DeviceIndex` and added error handling.
- Implemented `check_device_index` function for validating device indices.
- Enhanced Python bindings in `Module.cpp` for device management.
- Added tests for invalid device index handling in `test_device.py`.
@KarhouTam KarhouTam force-pushed the openreg-device-management branch from 46a0809 to 0db9941 Compare November 13, 2025 09:02
@pytorch-bot pytorch-bot bot removed the ciflow/trunk Trigger trunk jobs on your pull request label Nov 13, 2025
@KarhouTam KarhouTam marked this pull request as ready for review November 13, 2025 09:03
@KarhouTam
Copy link
Contributor Author

@pytorchbot label "ciflow/trunk"

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 13, 2025
@pytorch-bot pytorch-bot bot removed the ciflow/trunk Trigger trunk jobs on your pull request label Nov 13, 2025
@KarhouTam
Copy link
Contributor Author

@pytorchbot label "ciflow/trunk"

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 13, 2025
@fffrog
Copy link
Collaborator

fffrog commented Nov 14, 2025

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@KarhouTam KarhouTam deleted the openreg-device-management branch November 14, 2025 12:33
Silv3S pushed a commit to Silv3S/pytorch that referenced this pull request Nov 18, 2025
… and add focused documentation (pytorch#165897)

## Summary
This PR enriches OpenReg device management codes and adds focused documentation.

## Key Changes
- Introduced device management documentation in `device.md`.
- Updated `OpenRegFunctions.h` and `OpenRegFunctions.cpp` to use `DeviceIndex` and added error handling.
- Implemented `check_device_index` function for validating device indices.
- Enhanced Python bindings in `Module.cpp` for device management.
- Added tests for invalid device index handling in `test_device.py`.

Pull Request resolved: pytorch#165897
Approved by: https://github.com/fffrog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: openreg open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants