Skip to content

Commit 77f8ab6

Browse files
committed
[META] Deactivate moving arrays to pytorch gpu
1 parent 86b812d commit 77f8ab6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

gempy_engine/core/backend_tensor.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ def _change_backend(cls, engine_backend: AvailableBackends, use_pykeops: bool =
110110
# Check if CUDA is available
111111
if not pytorch_copy.cuda.is_available():
112112
raise RuntimeError("GPU requested but CUDA is not available in PyTorch")
113-
114-
# Set default device to CUDA
115-
cls.device = pytorch_copy.device("cuda")
116-
pytorch_copy.set_default_device("cuda")
117-
print(f"GPU enabled. Using device: {cls.device}")
118-
print(f"GPU device count: {pytorch_copy.cuda.device_count()}")
119-
print(f"Current GPU device: {pytorch_copy.cuda.current_device()}")
113+
if False:
114+
# Set default device to CUDA
115+
cls.device = pytorch_copy.device("cuda")
116+
pytorch_copy.set_default_device("cuda")
117+
print(f"GPU enabled. Using device: {cls.device}")
118+
print(f"GPU device count: {pytorch_copy.cuda.device_count()}")
119+
print(f"Current GPU device: {pytorch_copy.cuda.current_device()}")
120120
else:
121121
cls.use_gpu = False
122122
cls.device = pytorch_copy.device("cpu")

0 commit comments

Comments
 (0)