Open Flames60 opened 5 years ago
I try to use apex in your code, but it seems like the deformable conv does not support for fp16, is it right?
File "upsnet/../upsnet/operators/functions/deform_conv.py", line 50, in forward 1, ctx.deformable_groups, col_buffer) RuntimeError: expected scalar type Float but found Half (data_ptr at /home/flames/anaconda3/lib/python3.7/site-packages/torch/include/ATen/core/TensorMethods.h:5747) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7fa30d9b8813 in /home/flames/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: float* at::Tensor::data_ptr() const + 0x1c2 (0x7fa300052ca2 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so) frame #2: deformable_im2col_cuda(at::Tensor, at::Tensor, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, unsigned int, unsigned int, at::Tensor) + 0x39 (0x7fa3000514c9 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so) frame #3: + 0x14077 (0x7fa30005e077 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so) frame #4: + 0x10b52 (0x7fa30005ab52 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so) frame #9: THPFunction_apply(_object*, _object*) + 0x936 (0x7fa355ecf7e6 in /home/flames/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
File "upsnet/../upsnet/operators/functions/deform_conv.py", line 50, in forward 1, ctx.deformable_groups, col_buffer) RuntimeError: expected scalar type Float but found Half (data_ptr at /home/flames/anaconda3/lib/python3.7/site-packages/torch/include/ATen/core/TensorMethods.h:5747) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7fa30d9b8813 in /home/flames/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: float* at::Tensor::data_ptr() const + 0x1c2 (0x7fa300052ca2 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so) frame #2: deformable_im2col_cuda(at::Tensor, at::Tensor, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, std::vector<int, std::allocator >, unsigned int, unsigned int, at::Tensor) + 0x39 (0x7fa3000514c9 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so) frame #3: + 0x14077 (0x7fa30005e077 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so) frame #4: + 0x10b52 (0x7fa30005ab52 in upsnet/../upsnet/operators/_ext/deform_conv/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so)
I try to use apex in your code, but it seems like the deformable conv does not support for fp16, is it right?