The algorithm depends on the backend you are using. The FFT approach might not be the fastest in all cases.
Try to set torch.backend.cudnn.benchmark = True at the beginning of your script. This should chose the fastest algorithm for your input size. Note that this might slow down your code, if your input size changes a lot.


It seems your weight or input is not on the GPU. This code snippet works on the GPU:


x = torch.randn(1, 3, 24).to('cuda')
weight = torch.randn(6, 3, 3).to('cuda')

output = F.conv1d(x, weight)
print(output.device)
> cuda:0

Also float64 is working:
x = torch.randn(1, 3, 24, dtype=torch.double).to('cuda')
weight = torch.randn(6, 3, 3, dtype=torch.double).to('cuda')

output = F.conv1d(x, weight)
print(output.dtype)
> torch.float64
print(output.device)
> cuda:0