Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating to skip torch tests if torch.cuda not available #331

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

mc-nv
Copy link
Contributor

@mc-nv mc-nv commented Feb 29, 2024

No description provided.

@mc-nv mc-nv requested review from nnshah1 and jbkyang-nvi February 29, 2024 20:30
@@ -44,6 +44,9 @@

try:
import torch

if not torch.cuda.is_available():
torch = None
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nnshah1 can you help by providing comment on your change

Copy link
Contributor

@nnshah1 nnshah1 Mar 1, 2024

Choose a reason for hiding this comment

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

Some tests rely on not just torch, but torch.cuda to be available. There was a configuration / build in which torch was installed but cuda portion was not.

To safeguard I added the check - and if torch.cuda is not available treat that the same as torch being unavailable.

@mc-nv mc-nv requested a review from jbkyang-nvi March 1, 2024 20:16
@mc-nv mc-nv merged commit 5d4a99c into main Mar 1, 2024
1 check passed
@mc-nv mc-nv deleted the mchornyi-post-24.02 branch March 1, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants