Skip to content

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Jan 14, 2025

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jan 14, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 2 Pending, 1 Unrelated Failure

As of commit c799cef with merge base 95b41d2 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@malfet malfet requested review from ezyang and jansel January 14, 2025 20:11
@malfet malfet added topic: not user facing topic category ciflow/mps Run MPS tests (subset of trunk) labels Jan 14, 2025
and device.index is None
):
if getattr(torch, device.type).is_initialized():
if device.type != "mps" and getattr(torch, device.type).is_initialized():
Copy link
Contributor

Choose a reason for hiding this comment

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

what's going on here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it documented anywhere, that torch.device.is_initialized() should be available? I can implement that function, but I'm unsure what it actually means. That memory were allocated on GPU?

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean, we have torch.cuda.is_initialized which means the CUDA context has been initialized. If your accelerator has no meaningful concept of initialization you can just always return True.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Jan 15, 2025
@github-actions github-actions bot deleted the gh/malfet/126/head branch February 15, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants