Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,12 @@ import re # <--- ADD THIS LINE FOR THE NAMEERROR
|
|
28 |
# Set CUDA_HOME explicitly for custom CUDA kernel compilation
|
29 |
os.environ["CUDA_HOME"] = "/usr/local/cuda"
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
# Flag to check if GPU is present
|
32 |
HAS_GPU = False # Initialize to False, let pynvml determine
|
33 |
GPU_COUNT = 0
|
|
|
28 |
# Set CUDA_HOME explicitly for custom CUDA kernel compilation
|
29 |
os.environ["CUDA_HOME"] = "/usr/local/cuda"
|
30 |
|
31 |
+
|
32 |
+
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
33 |
+
# True
|
34 |
+
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
35 |
+
# Tesla T4
|
36 |
+
|
37 |
# Flag to check if GPU is present
|
38 |
HAS_GPU = False # Initialize to False, let pynvml determine
|
39 |
GPU_COUNT = 0
|