fix emojies
This commit is contained in:
@@ -25,7 +25,7 @@ if torch.cuda.is_available():
|
||||
print("=" * 80)
|
||||
try:
|
||||
x = torch.tensor([1.0, 2.0, 3.0]).cuda()
|
||||
print("✓ PASSED: Simple tensor creation on GPU")
|
||||
print("PASSED: Simple tensor creation on GPU")
|
||||
except Exception as e:
|
||||
print(f"✗ FAILED: {e}")
|
||||
sys.exit(1)
|
||||
@@ -38,7 +38,7 @@ if torch.cuda.is_available():
|
||||
a = torch.randn(100, 100).cuda()
|
||||
b = torch.randn(100, 100).cuda()
|
||||
c = torch.matmul(a, b)
|
||||
print("✓ PASSED: Matrix multiplication on GPU")
|
||||
print("PASSED: Matrix multiplication on GPU")
|
||||
except Exception as e:
|
||||
print(f"✗ FAILED: {e}")
|
||||
sys.exit(1)
|
||||
@@ -51,8 +51,8 @@ if torch.cuda.is_available():
|
||||
x = torch.randn(10, 20).cuda()
|
||||
linear = torch.nn.Linear(20, 10).cuda()
|
||||
y = linear(x)
|
||||
print("✓ PASSED: Linear layer on GPU")
|
||||
print("✓ Your GPU is fully compatible!")
|
||||
print("PASSED: Linear layer on GPU")
|
||||
print("Your GPU is fully compatible!")
|
||||
except RuntimeError as e:
|
||||
if "invalid device function" in str(e):
|
||||
print(f"✗ FAILED: {e}")
|
||||
@@ -77,7 +77,7 @@ if torch.cuda.is_available():
|
||||
x = torch.randn(1, 3, 32, 32).cuda()
|
||||
conv = torch.nn.Conv2d(3, 16, 3).cuda()
|
||||
y = conv(x)
|
||||
print("✓ PASSED: Convolutional layer on GPU")
|
||||
print("PASSED: Convolutional layer on GPU")
|
||||
except Exception as e:
|
||||
print(f"✗ FAILED: {e}")
|
||||
|
||||
@@ -89,7 +89,7 @@ if torch.cuda.is_available():
|
||||
x = torch.randn(1, 10, 512).cuda()
|
||||
transformer = torch.nn.TransformerEncoderLayer(d_model=512, nhead=8).cuda()
|
||||
y = transformer(x)
|
||||
print("✓ PASSED: Transformer layer on GPU")
|
||||
print("PASSED: Transformer layer on GPU")
|
||||
except Exception as e:
|
||||
print(f"✗ FAILED: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user