#!/usr/bin/env -S uv run # /// script # dependencies = [ # "torch", # "torchvision", # "tqdm", # "tensorboard" # ] # [tool.uv.sources] # torch = { index = "pytorch-cu128" } # torchvision = { index = "pytorch-cu128" } # # [[tool.uv.index]] # name = "pytorch-cu128" # url = "https://download.pytorch.org/whl/cu128" # /// import torch print(f"pytorch version: {torch.__version__}") print(f"cuda available: {torch.cuda.is_available()}") if torch.cuda.is_available(): print(f"cuda device: {torch.cuda.get_device_name(0)}") print(f"cuda version: {torch.version.cuda}")