diff --git a/torch/README.md b/torch/README.md new file mode 100644 index 00000000..416d6e3a --- /dev/null +++ b/torch/README.md @@ -0,0 +1,3 @@ +# 2023-10-24 + +Installing torch breaks jax. diff --git a/torch/check_gpu.py b/torch/check_gpu.py new file mode 100755 index 00000000..e7215625 --- /dev/null +++ b/torch/check_gpu.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +import torch +torch.cuda.current_device() +torch.cuda.device_count() +torch.cuda.get_device_name(0) +# device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') +# print('Using device:', device) +# print() +# +# if device.type == 'cuda': +# print(torch.cuda.get_device_name(0)) +# print('Memory Usage:') +# print('Allocated:', round(torch.cuda.memory_allocated(0)/1024**3,1), 'GB') +# print('Cached: ', round(torch.cuda.memory_cached(0)/1024**3,1), 'GB')