[Feature] Add NPU support for SyncDataCollector#3155
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/3155
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @lowdy1! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
vmoens
left a comment
There was a problem hiding this comment.
LGTM -- just need to sign the CLA for me to merge!
|
Glad to know that and CLA signed. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Description
This PR introduces native NPU device support to SyncDataCollector, enabling it to seamlessly accept CPU, CUDA, MPS, and NPU devices. With this change, users can easily run state-of-the-art implementations on NPUs without modifying the core workflow.
Motivation and Context
We aim to add Ascend NPU support to TorchRL. This PR is a first step that makes it straightforward to run sota-implementations on NPU devices by simply moving all components including DataCollectors onto NPU. Related discussion can be found here: #3154
Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
xin all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!