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

[AutoMM] Log GPU info #3291

Merged
merged 4 commits into from
Jun 8, 2023
Merged

[AutoMM] Log GPU info #3291

merged 4 commits into from
Jun 8, 2023

Conversation

zhiqiangdon
Copy link
Contributor

Issue #, if available:
#3284

Description of changes:
Log AG version, torch version, and GPU info.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment on lines 186 to 193
def get_gpu_message(detected_num_gpus: int, used_num_gpus: int):
gpu_message = ""
gpu_message += f"{detected_num_gpus} GPUs are detected, and {used_num_gpus} GPUs will be used.\n"
for i in range(detected_num_gpus):
free_memory, total_memory = torch.cuda.mem_get_info(i)
gpu_message += f" - GPU {i} name: {torch.cuda.get_device_name(i)}\n"
gpu_message += f" - GPU {i} memory: {free_memory * 1e-9:.2f}GB/{total_memory * 1e-9:.2f}GB (Free/Total)\n"
gpu_message += f"CUDA version is {torch.version.cuda}.\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if CUDA isn't installed (CPU torch)? Is that possible, or is CUDA always present even on CPU?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Added CUDA detection to print CUDA version.

@zhiqiangdon zhiqiangdon added the model list checked You have updated the model list after modifying multimodal unit tests/docs label Jun 8, 2023
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

Job PR-3291-8bbc2f6 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-3291/8bbc2f6/index.html

Copy link
Contributor

@Innixma Innixma left a comment

Choose a reason for hiding this comment

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

LGTM, this looks great!

@zhiqiangdon zhiqiangdon merged commit 440fa90 into autogluon:master Jun 8, 2023
29 of 30 checks passed
@zhiqiangdon zhiqiangdon deleted the mm-log branch June 8, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model list checked You have updated the model list after modifying multimodal unit tests/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants