fix: total_mem → total_memory (corex torch API)

This commit is contained in:
project6
2026-08-10 07:55:39 +00:00
parent 570ee94172
commit 7ec50ff3cf

View File

@@ -26,7 +26,7 @@ print(f" torch: {torch.__version__}")
print(f" CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
print(f" GPU: {torch.cuda.get_device_name(0)}")
print(f" Memory: {torch.cuda.get_device_properties(0).total_mem / 1024**3:.1f} GB")
print(f" Memory: {torch.cuda.get_device_properties(0).total_memory / 1024**3:.1f} GB")
else:
print(" ERROR: No CUDA device!")
sys.exit(1)
@@ -322,4 +322,4 @@ print("=" * 70)
print(f" CUDA kernel topk_softmax: {'✓ READY' if moe_ext else '✗ NOT AVAILABLE'}")
print(f" GDN chunked (no NaN): {'' if not any_nan else '✗ HAS NaN'}")
print(f" GPU memory used: {torch.cuda.memory_allocated()/1024**2:.0f} MB")
print(f" GPU memory free: {(torch.cuda.get_device_properties(0).total_mem - torch.cuda.memory_allocated())/1024**3:.1f} GB")
print(f" GPU memory free: {(torch.cuda.get_device_properties(0).total_memory - torch.cuda.memory_allocated())/1024**3:.1f} GB")