Support for pytorch1.4.0
Closed this issue · 1 comments
kwea123 commented
Currently, the code cannot compile with torch 1.4.0 (it can work with 1.3.1). It produces lots of "... is deprecated" warnings and finally an error which prevents it from compiling:
src/inplace_abn.cpp: In function ‘void pybind11_init__backend(pybind11::module&)’:
src/inplace_abn.cpp:145:107: error: no matching function for call to ‘pybind11::module::def(const char [9], <unresolved overloaded function type>, const char [74])’
m.def("backward", &backward, "Second step of the backward pass. This is an in-place operation w.r.t. dy");
^
In file included from /home/ubuntu/anaconda3/envs/test/lib/python3.6/site-packages/torch/include/torch/csrc/utils/pybind.h:6:0,
from /home/ubuntu/anaconda3/envs/test/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/python.h:12,
from /home/ubuntu/anaconda3/envs/test/lib/python3.6/site-packages/torch/include/torch/extension.h:6,
from src/inplace_abn.cpp:3:
/home/ubuntu/anaconda3/envs/test/lib/python3.6/site-packages/torch/include/pybind11/pybind11.h:810:13: note: candidate: template<class Func, class ... Extra> pybind11::module& pybind11::module::def(const char*, Func&&, const Extra& ...)
module &def(const char *name_, Func &&f, const Extra& ... extra) {
^
/home/ubuntu/anaconda3/envs/test/lib/python3.6/site-packages/torch/include/pybind11/pybind11.h:810:13: note: template argument deduction/substitution failed:
src/inplace_abn.cpp:145:107: note: couldn't deduce template parameter ‘Func’
m.def("backward", &backward, "Second step of the backward pass. This is an in-place operation w.r.t. dy");
^
error: command 'gcc' failed with exit status 1