This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ROCm-Research-Archive/Scripts and Tests/test_rocm.sh
T
2026-08-20 00:45:43 +02:00

23 lines
759 B
Bash

#!/bin/bash
/home/fabian/ComfyUI/venv/bin/python -c "
import torch
print('CUDA available:', torch.cuda.is_available())
print('HIP version:', torch.version.hip)
if torch.cuda.is_available():
print('Device:', torch.cuda.get_device_name(0))
print('VRAM:', torch.cuda.get_device_properties(0).total_memory / 1024**3, 'GB')
# Quick matmul test
import time
a = torch.randn(1024, 1024, device='cuda', dtype=torch.float16)
b = torch.randn(1024, 1024, device='cuda', dtype=torch.float16)
torch.cuda.synchronize()
t0 = time.time()
for _ in range(10):
c = torch.matmul(a, b)
torch.cuda.synchronize()
t1 = time.time()
print(f'10x matmul 1024x1024 f16: {(t1-t0)*1000:.0f}ms')
else:
print('CUDA NOT AVAILABLE')
"