-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
bugIssues noting problems and PRs fixing those problems.Issues noting problems and PRs fixing those problems.
Description
Summary
When fitting a coordinate-based meta-regression model (Google Collab, with correct GPU settings), GPUs are not recruited appropriately. Instead CPUs are used.
Here is the error message:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)
Additional details
- NiMARE version: latest
What were you trying to do?
Here is the code:
cbmr = CBMREstimator(
group_categories=["motor"],
moderators=[
"moderator",
],
spline_spacing=100,
model=models.PoissonEstimator,
penalty=False,
lr=1e-1,
tol=1e3,
device="cuda", # "cuda" if you have GPU or "cpu" for CPU
)
What did you expect to happen?
GPU usage
What actually happened?
(mainly) CPU usage + error message
Yet, GPU availability confirmed with
!nvidia-smi
import torch
torch.cuda.is_available()
import tensorflow as tf
tf.test.gpu_device_name()
Reproducing the bug
Some code above, rest of the code is here:
https://colab.research.google.com/drive/1EVngYoYlryl-YcjmIEOjm0VBBplc-Qyw?usp=sharing
Metadata
Metadata
Assignees
Labels
bugIssues noting problems and PRs fixing those problems.Issues noting problems and PRs fixing those problems.