Cuda Error: RunTimeError: Unrecognized CachingAllocator option: 0

Hi,
I have problems with cuda. I have the following versions installed:
Torch version: 2.3.0+cu121
Nvidia information: Driver: 538.62; CUDA Version: 12.1

When I run the example

import torch
print(torch.cuda.is_available())
x = torch.tensor([1.0, 2.0]).cuda()
print(x)

there is no problem at all. But when I run my Code:
if(torch.cuda.is_available()):
model=Model_GRU(input_dim, output_dim,n_hidden,n_layers,
dropout,isBidirectional,dense_layers).cuda()

I geht the following Error Message:

RunTimeError: Unrecognized CachingAllocator option: 0

Does anyone know this Error Message and can help?

Thanks a lot
Tim

1 Like

Could you post a minimal and executable code snippet reproducing the error?

1 Like