{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "ca142d3d-f339-41fd-a536-b38c24285848", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "PyTorch Version: 2.10.0+cu130\n", "CUDA Available: True\n", "CUDA Device Count: 8\n", "Current CUDA Device: 0\n", "CUDA Device Name: NVIDIA GeForce RTX 5090\n" ] } ], "source": [ "import torch\n", "\n", "print(\"PyTorch Version:\", torch.__version__)\n", "print(\"CUDA Available:\", torch.cuda.is_available())\n", "print(\"CUDA Device Count:\", torch.cuda.device_count())\n", "print(\"Current CUDA Device:\", torch.cuda.current_device())\n", "print(\"CUDA Device Name:\", torch.cuda.get_device_name(torch.cuda.current_device()) if torch.cuda.is_available() else \"No GPU detected\")" ] }, { "cell_type": "code", "execution_count": null, "id": "2ef34dc2-ed64-49cc-ba3c-9cf61cb4cbb0", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "There is 1 choice for the alternative cuda (providing /usr/local/cuda).\n", "\n", " Selection Path Priority Status\n", "------------------------------------------------------------\n", "* 0 /usr/local/cuda-13.0 130 auto mode\n", " 1 /usr/local/cuda-13.0 130 manual mode\n", "\n", "Press to keep the current choice[*], or type selection number: " ] } ], "source": [ "!update-alternatives --config cuda" ] }, { "cell_type": "code", "execution_count": null, "id": "e933f85a-4981-43c4-baaa-179b181b2686", "metadata": {}, "outputs": [], "source": [ "!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130 -U " ] }, { "cell_type": "code", "execution_count": null, "id": "81cdef27-bcb7-47cb-b2f4-8e6330962a19", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.13" } }, "nbformat": 4, "nbformat_minor": 5 }