MONAILabel icon indicating copy to clipboard operation
MONAILabel copied to clipboard

Monai whole body segmentation unable to run on gpu in colab

Open Alisoltan82 opened this issue 1 year ago • 4 comments

Good day,

Trying to run whole-body segmentation model (Model_lowers.pt) on colab gpu and getting this error:

error message: NotImplementedError: Could not run 'aten::slow_conv3d_forward' with arguments from the 'CUDA' backend.

device is detected by torch.device = [Tesla 4] cuda version = 12.1 pytorch installed = 2.1.0+cu121 inference json device line = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')

Any advice to resolve this?

Alisoltan82 avatar Jan 09 '24 06:01 Alisoltan82

Looks like a CPU-GPU device tensor convert issue. Are you using only GPUs for inference. Any issues/inconsistencies of CPU/GPU input/output conversions?

tangy5 avatar Jan 09 '24 15:01 tangy5

I defined the device = torch.device (‘cuda’) Same in inference.json file

and noticeably, when I change the to “cpu” it works

Alisoltan82 avatar Jan 10 '24 11:01 Alisoltan82