[Profiler] Do not emit a warning when using CPU profiler#125654
[Profiler] Do not emit a warning when using CPU profiler#125654
Conversation
This fixes a logic regression introduced by #123247 where ```python if self.use_device and self.use_device != _get_privateuse1_backend_name(): ``` was replaced with ```python VALID_DEVICE_OPTIONS = ["cuda", "xpu", "privateuseone"] if self.use_device not in VALID_DEVICE_OPTIONS: ``` That triggers a warning every time code is invoke with `self.use_device` set to None
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125654
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 05a22f1 with merge base f35fe4e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
aaronenyeshi
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the fix!
|
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge startedYour 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 |
|
[Edit] #123247 is not part of the release, so removing the milestone |
This fixes a logic regression introduced by #123247 where
was replaced with
That triggers a warning every time code is invoke with
self.use_deviceset to NoneThis change also skips all the checks which are useless if
use_deviceis None to begin with