ner-study/cuda_test.py
2022-02-14 08:28:54 +09:00

9 lines
308 B
Python

import torch as tc
if __name__ == "__main__":
print("cuda available :",tc.cuda.is_available())
print("available device count :",tc.cuda.device_count())
if tc.cuda.is_available():
device_index = tc.cuda.current_device()
print("device name:",tc.cuda.get_device_name(device_index))