print("Hello world on this annoying server")
import torch
def test_cuda():
    # Check if CUDA is available
    if torch.cuda.is_available():
        print("CUDA is available! 🎉")
        # Listing available devices
        num_devices = torch.cuda.device_count()
        print(f"Number of CUDA devices available: {num_devices}")
        for i in range(num_devices):
            print(f"CUDA Device {i}: {torch.cuda.get_device_name(i)}")
        
        # Perform a basic operation on CUDA device
        x = torch.tensor([1.0, 2.0, 3.0]).cuda()
        y = torch.tensor([1.0, 2.0, 3.0]).cuda()
        z = x + y
        print("Successfully performed a tensor operation on CUDA device:", z)
    else:
        print("CUDA is not available. Please check your PyTorch and CUDA installation.")

if __name__ == "__main__":
    test_cuda()