From 129f81eaee55181f99c5f84cfa08c0d39ce9111e Mon Sep 17 00:00:00 2001 From: Pablo Olivares Date: Mon, 24 Jun 2024 21:56:39 +0200 Subject: [PATCH] Check cuda script advances #26 --- device_check.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 device_check.py diff --git a/device_check.py b/device_check.py new file mode 100644 index 0000000..00f5fa4 --- /dev/null +++ b/device_check.py @@ -0,0 +1,8 @@ +import torch + +def main(): + device = torch.device("cuda" if torch.cuda.is_available() else "cpu") + print(f"Device: {device}") + +if __name__ == "__main__": + main() \ No newline at end of file