Conv3d not implemented for CUDA in libtorch?

Hello all,
I was trying to include conv3D layers in my models but upon running it, it said

terminate called after throwing an instance of 'c10::Error'
  what():  Could not run 'aten::slow_conv3d_forward' with arguments from the 'CUDA' backend. 'aten::slow_conv3d_forward' is only available for these backends: [CPU, BackendSelect, Named, Autograd, Tracer, Autocast, Batched].

The code is as follows -

#include <iostream>
#include <torch/torch.h>
#include "PredictFrame.h"
using namespace torch;
using namespace std;

int main() {
    /*
    PredictFrame predictFrame;
    predictFrame.to(torch::kCUDA);
    auto input = torch::rand({1, 3, 5, 900, 900});
    input.to(torch::kCUDA);
    auto out = predictFrame.forward(input);
    cout<<out.sizes();
     */
    cout<<"starting";
    cout<<std::boolalpha<<torch::cuda::is_available();

    auto conv1 = torch::nn::Conv3d(torch::nn::Conv3dOptions(3, 64, {3, 1,1})
            .stride({1 ,1, 1}).padding({1, 0, 0}));
    conv1->to(torch::kCUDA);
    auto input = torch::rand({1, 3 ,5, 10, 10});
    input.to(torch::kCUDA);
    auto output = conv1->forward(input);
    cout<<output;
}

and the complete error encountered upon running it is as follows -

/home/atharva/CLionProjects/SuperTux_RL/SuperTux_RL
terminate called after throwing an instance of 'c10::Error'
  what():  Could not run 'aten::slow_conv3d_forward' with arguments from the 'CUDA' backend. 'aten::slow_conv3d_forward' is only available for these backends: [CPU, BackendSelect, Named, Autograd, Tracer, Autocast, Batched].

CPU: registered at aten/src/ATen/CPUType.cpp:1596 [kernel]
BackendSelect: fallthrough registered at ../aten/src/ATen/core/BackendSelectFallbackKernel.cpp:3 [backend fallback]
Named: registered at ../aten/src/ATen/core/NamedRegistrations.cpp:7 [backend fallback]
Autograd: registered at ../torch/csrc/autograd/generated/VariableType_4.cpp:7155 [kernel]
Tracer: registered at ../torch/csrc/autograd/generated/TraceType_4.cpp:8208 [kernel]
Autocast: fallthrough registered at ../aten/src/ATen/autocast_mode.cpp:371 [backend fallback]
Batched: registered at ../aten/src/ATen/BatchingRegistrations.cpp:229 [backend fallback]

Exception raised from reportError at ../aten/src/ATen/core/dispatch/OperatorEntry.cpp:261 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x69 (0x7f1fd082fe99 in /home/atharva/libtorch/libtorch/lib/libc10.so)
frame #1: c10::impl::OperatorEntry::reportError(c10::DispatchKey) const + 0x3ac (0x7f1fc0bf9f2c in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #2: <unknown function> + 0x1478936 (0x7f1fc1508936 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #3: at::slow_conv3d_forward(at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::optional<at::Tensor> const&, c10::ArrayRef<long>, c10::ArrayRef<long>) + 0x139 (0x7f1fc14287e9 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #4: <unknown function> + 0x294fae8 (0x7f1fc29dfae8 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #5: <unknown function> + 0x295031d (0x7f1fc29e031d in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #6: <unknown function> + 0x12933c2 (0x7f1fc13233c2 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #7: <unknown function> + 0x14788e7 (0x7f1fc15088e7 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #8: at::slow_conv3d_forward(at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::optional<at::Tensor> const&, c10::ArrayRef<long>, c10::ArrayRef<long>) + 0x139 (0x7f1fc14287e9 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #9: at::native::slow_conv3d(at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, at::Tensor const&, c10::ArrayRef<long>, c10::ArrayRef<long>) + 0x58 (0x7f1fc0d4c608 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #10: <unknown function> + 0x14cb6f0 (0x7f1fc155b6f0 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #11: <unknown function> + 0x15098b2 (0x7f1fc15998b2 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #12: <unknown function> + 0x14f9d02 (0x7f1fc1589d02 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #13: <unknown function> + 0x1477d8e (0x7f1fc1507d8e in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #14: at::slow_conv3d(at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::optional<at::Tensor> const&, c10::ArrayRef<long>, c10::ArrayRef<long>) + 0x139 (0x7f1fc1427f89 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #15: at::native::_convolution(at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, bool, c10::ArrayRef<long>, long, bool, bool, bool) + 0x4505 (0x7f1fc0d3b865 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #16: <unknown function> + 0x14adc77 (0x7f1fc153dc77 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #17: <unknown function> + 0x1507f4d (0x7f1fc1597f4d in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #18: <unknown function> + 0xb0b08c (0x7f1fc0b9b08c in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #19: <unknown function> + 0x13f9a54 (0x7f1fc1489a54 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #20: at::_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, bool, c10::ArrayRef<long>, long, bool, bool, bool) + 0x1fe (0x7f1fc1399e9e in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #21: at::native::convolution(at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, bool, c10::ArrayRef<long>, long) + 0xd4 (0x7f1fc0d332a4 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #22: <unknown function> + 0x14ad900 (0x7f1fc153d900 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #23: <unknown function> + 0x1507db5 (0x7f1fc1597db5 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #24: <unknown function> + 0xb0b2b6 (0x7f1fc0b9b2b6 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #25: <unknown function> + 0x13f8cc8 (0x7f1fc1488cc8 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #26: at::convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, bool, c10::ArrayRef<long>, long) + 0x194 (0x7f1fc1399454 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #27: at::native::conv3d(at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, long) + 0x78 (0x7f1fc0d32f88 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #28: <unknown function> + 0x14ae1ef (0x7f1fc153e1ef in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #29: <unknown function> + 0x15083c8 (0x7f1fc15983c8 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #30: <unknown function> + 0xb0b176 (0x7f1fc0b9b176 in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #31: <unknown function> + 0x13faeef (0x7f1fc148aeef in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #32: at::conv3d(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, long) + 0x13c (0x7f1fc139ae8c in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #33: torch::nn::Conv3dImpl::forward(at::Tensor const&) + 0x10f (0x7f1fc326c4af in /home/atharva/libtorch/libtorch/lib/libtorch_cpu.so)
frame #34: <unknown function> + 0xc233 (0x55c86651d233 in /home/atharva/CLionProjects/SuperTux_RL/SuperTux_RL)
frame #35: __libc_start_main + 0xf3 (0x7f1f80bd40b3 in /lib/x86_64-linux-gnu/libc.so.6)
frame #36: <unknown function> + 0xbdee (0x55c86651cdee in /home/atharva/CLionProjects/SuperTux_RL/SuperTux_RL)


Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

I was wondering if there is an installation issue with my system or conv3d layers not support running on GPU?

Edit - torch::cuda::is_available() returns true

The answer is quite simple, you have to reassign the variable in the to method. For example
input = input.to(torch::kCUDA) and it will work.