I'm using Apex within the nvidia/cuda docker container. I was using commit 500939d04a863f78b2af3c72c123deee3609469d, and everything was working. Today I pulled and tried building it and it fails.
Steps to reproduce:
nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04apt update && apt install -y python3 python3-pip git
pip3 install torch numpy
git clone https://github.com/nvidia/apex
cd apex
python3 setup.py install --cuda_ext --cpp_ext
The build fails:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1165:206: error: expansion pattern 'pybind11::detail::negation<std::is_same<pybind11::detail::bools<pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ..., true>, pybind11::detail::bools<true, pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ...> > >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1165:215: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1165:392: error: expansion pattern 'pybind11::detail::negation<std::is_same<pybind11::detail::bools<pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ..., true>, pybind11::detail::bools<true, pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ...> > >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1165:395: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1165:397: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1165:397: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1165:412: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:149: error: expansion pattern 'std::is_copy_constructible<_Tp>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:240: error: expansion pattern 'std::is_same<typename Container::value_type&, typename Container::reference>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:249: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:249: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:312: error: expansion pattern 'std::is_copy_constructible<_Tp>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:403: error: expansion pattern 'std::is_same<typename Container::value_type&, typename Container::reference>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:406: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:406: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:408: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:408: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:423: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:766:425: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:126: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:170: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char16_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:214: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char32_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:257: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, wchar_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:260: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:260: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:260: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:260: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:960:262: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:138: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:186: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char16_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:234: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char32_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:281: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, wchar_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:284: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:284: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:284: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:284: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:286: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:301: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1250:303: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:121: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:169: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char16_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:217: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, char32_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:264: error: expansion pattern 'pybind11::detail::negation<std::is_same<CharT, wchar_t> >' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:267: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:267: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:267: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:267: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:269: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:284: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1261:286: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:112: error: expansion pattern 'std::is_void<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:137: error: expansion pattern 'std::is_pointer<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:164: error: expansion pattern 'std::is_reference<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:187: error: expansion pattern 'std::is_const<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:190: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:190: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:190: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:190: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:192: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:201: error: expected parameter pack before '...'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:251: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::is_copy_constructible<T1> >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:294: error: expansion pattern 'std::is_move_constructible<_Tp>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:392: error: expansion pattern 'std::is_same<decltype (declval<pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type, void> >().operator T&()), T&>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:401: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:401: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:401: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:401: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:453: error: expansion pattern 'std::is_void<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:478: error: expansion pattern 'std::is_pointer<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:505: error: expansion pattern 'std::is_reference<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:528: error: expansion pattern 'std::is_const<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:531: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:531: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:531: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:531: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:533: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:542: error: expected parameter pack before '...'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:592: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::is_copy_constructible<T1> >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:635: error: expansion pattern 'std::is_move_constructible<_Tp>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:733: error: expansion pattern 'std::is_same<decltype (declval<pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type, void> >().operator T&()), T&>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:736: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:736: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:736: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:736: error: template argument 5 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:738: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:738: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:753: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1583:755: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:121: error: expansion pattern 'std::is_void<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:146: error: expansion pattern 'std::is_pointer<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:173: error: expansion pattern 'std::is_reference<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:196: error: expansion pattern 'std::is_const<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:199: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:199: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:199: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:199: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:201: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:210: error: expected parameter pack before '...'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:250: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::move_always<T> >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:293: error: expansion pattern 'std::is_move_constructible<_Tp>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:391: error: expansion pattern 'std::is_same<decltype (declval<pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type, void> >().operator T&()), T&>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:400: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:400: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:400: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:400: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:452: error: expansion pattern 'std::is_void<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:477: error: expansion pattern 'std::is_pointer<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:504: error: expansion pattern 'std::is_reference<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:527: error: expansion pattern 'std::is_const<_Tp>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:530: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:530: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:530: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:530: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:532: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:541: error: expected parameter pack before '...'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:581: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::move_always<T> >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:624: error: expansion pattern 'std::is_move_constructible<_Tp>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:722: error: expansion pattern 'std::is_same<decltype (declval<pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type, void> >().operator T&()), T&>::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:725: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:725: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:725: error: template argument 4 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:725: error: template argument 5 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:727: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:727: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:742: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1590:744: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1670:100: error: expansion pattern 'pybind11::detail::move_always<T>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1670:138: error: expansion pattern 'pybind11::detail::move_if_unreferenced<T>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1670:141: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1670:141: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1670:143: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1670:155: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1700:99: error: expansion pattern 'pybind11::detail::move_always<T>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1700:137: error: expansion pattern 'pybind11::detail::move_if_unreferenced<T>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1700:140: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1700:140: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1700:142: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1700:154: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2074:145: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::negation<std::is_same<pybind11::detail::bools<pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ..., true>, pybind11::detail::bools<true, pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ...> > > >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2074:154: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2074:278: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::negation<std::is_same<pybind11::detail::bools<pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ..., true>, pybind11::detail::bools<true, pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ...> > > >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2074:281: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2074:283: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2074:283: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2074:298: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2081:146: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::negation<std::is_same<pybind11::detail::bools<pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ..., true>, pybind11::detail::bools<true, pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ...> > > >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2081:155: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2081:279: error: expansion pattern 'pybind11::detail::negation<pybind11::detail::negation<std::is_same<pybind11::detail::bools<pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ..., true>, pybind11::detail::bools<true, pybind11::detail::negation<std::is_base_of<pybind11::arg, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::args_proxy, Args> >::value ..., pybind11::detail::negation<std::is_same<pybind11::detail::kwargs_proxy, Args> >::value ...> > > >::value' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2081:282: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2081:284: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2081:284: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2081:299: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:113: error: expansion pattern 'std::is_function<typename std::remove_reference<_From>::type>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:171: error: expansion pattern 'std::is_pointer<typename std::remove_reference< <template-parameter-1-1> >::type>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:236: error: expansion pattern 'std::is_member_pointer<typename std::remove_reference< <template-parameter-1-1> >::type>' contains no argument packs
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:239: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:239: error: template argument 2 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:239: error: template argument 3 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:241: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:64:256: error: template argument 1 is invalid
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h: In function 'void pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1499:54: error: no matching function for call to 'pybind11::cpp_function::cpp_function(pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)::<lambda(pybind11::handle)>)'
[patient](handle weakref) { patient.dec_ref(); weakref.dec_ref(); });
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:79:1: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...) const, const Extra& ...)
cpp_function(Return (Class::*f)(Arg...) const, const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:79:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1499:54: note: mismatched types 'Return (Class::*)(Arg ...) const' and 'pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)::<lambda(pybind11::handle)>'
[patient](handle weakref) { patient.dec_ref(); weakref.dec_ref(); });
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:72:1: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...), const Extra& ...)
cpp_function(Return (Class::*f)(Arg...), const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:72:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1499:54: note: mismatched types 'Return (Class::*)(Arg ...)' and 'pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)::<lambda(pybind11::handle)>'
[patient](handle weakref) { patient.dec_ref(); weakref.dec_ref(); });
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:65:1: note: candidate: template<class Func, class ... Extra, class> pybind11::cpp_function::cpp_function(Func&&, const Extra& ...)
cpp_function(Func &&f, const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:65:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:58:1: note: candidate: template<class Return, class ... Args, class ... Extra> pybind11::cpp_function::cpp_function(Return (*)(Args ...), const Extra& ...)
cpp_function(Return (*f)(Args...), const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:58:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1499:54: note: mismatched types 'Return (*)(Args ...)' and 'pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)::<lambda(pybind11::handle)>'
[patient](handle weakref) { patient.dec_ref(); weakref.dec_ref(); });
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:54:1: note: candidate: pybind11::cpp_function::cpp_function(std::nullptr_t)
cpp_function(std::nullptr_t) { }
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:54:1: note: no known conversion for argument 1 from 'pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)::<lambda(pybind11::handle)>' to 'std::nullptr_t'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:53:9: note: candidate: pybind11::cpp_function::cpp_function()
cpp_function() { }
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:53:9: note: candidate expects 0 arguments, 1 provided
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(const pybind11::cpp_function&)
class cpp_function : public function {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: no known conversion for argument 1 from 'pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)::<lambda(pybind11::handle)>' to 'const pybind11::cpp_function&'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(pybind11::cpp_function&&)
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: no known conversion for argument 1 from 'pybind11::detail::keep_alive_impl(pybind11::handle, pybind11::handle)::<lambda(pybind11::handle)>' to 'pybind11::cpp_function&&'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h: In function 'std::pair<std::__detail::_Node_iterator<std::pair<_typeobject* const, std::vector<pybind11::detail::type_info*> >, false, false>, bool> pybind11::detail::all_type_info_get_cache(PyTypeObject*)':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1535:3: error: no matching function for call to 'pybind11::cpp_function::cpp_function(pybind11::detail::all_type_info_get_cache(PyTypeObject*)::<lambda(pybind11::handle)>)'
})).release();
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:79:1: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...) const, const Extra& ...)
cpp_function(Return (Class::*f)(Arg...) const, const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:79:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1535:3: note: mismatched types 'Return (Class::*)(Arg ...) const' and 'pybind11::detail::all_type_info_get_cache(PyTypeObject*)::<lambda(pybind11::handle)>'
})).release();
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:72:1: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...), const Extra& ...)
cpp_function(Return (Class::*f)(Arg...), const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:72:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1535:3: note: mismatched types 'Return (Class::*)(Arg ...)' and 'pybind11::detail::all_type_info_get_cache(PyTypeObject*)::<lambda(pybind11::handle)>'
})).release();
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:65:1: note: candidate: template<class Func, class ... Extra, class> pybind11::cpp_function::cpp_function(Func&&, const Extra& ...)
cpp_function(Func &&f, const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:65:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:58:1: note: candidate: template<class Return, class ... Args, class ... Extra> pybind11::cpp_function::cpp_function(Return (*)(Args ...), const Extra& ...)
cpp_function(Return (*f)(Args...), const Extra&... extra) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:58:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1535:3: note: mismatched types 'Return (*)(Args ...)' and 'pybind11::detail::all_type_info_get_cache(PyTypeObject*)::<lambda(pybind11::handle)>'
})).release();
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:54:1: note: candidate: pybind11::cpp_function::cpp_function(std::nullptr_t)
cpp_function(std::nullptr_t) { }
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:54:1: note: no known conversion for argument 1 from 'pybind11::detail::all_type_info_get_cache(PyTypeObject*)::<lambda(pybind11::handle)>' to 'std::nullptr_t'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:53:9: note: candidate: pybind11::cpp_function::cpp_function()
cpp_function() { }
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:53:9: note: candidate expects 0 arguments, 1 provided
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(const pybind11::cpp_function&)
class cpp_function : public function {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: no known conversion for argument 1 from 'pybind11::detail::all_type_info_get_cache(PyTypeObject*)::<lambda(pybind11::handle)>' to 'const pybind11::cpp_function&'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(pybind11::cpp_function&&)
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: no known conversion for argument 1 from 'pybind11::detail::all_type_info_get_cache(PyTypeObject*)::<lambda(pybind11::handle)>' to 'pybind11::cpp_function&&'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'T pybind11::object::cast() && [with T = std::basic_string<char>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/detail/class.h:537:138: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1705:68: error: could not convert 'pybind11::cast<std::basic_string<char> >((* & std::move<pybind11::object&>((*(pybind11::object*)this))))' from 'int' to 'std::basic_string<char>'
template <typename T> T object::cast() && { return pybind11::cast<T>(std::move(*this)); }
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'pybind11::object pybind11::detail::object_api<Derived>::operator()(Args&& ...) const [with pybind11::return_value_policy policy = (pybind11::return_value_policy)1u; Args = {}; Derived = pybind11::detail::accessor<pybind11::detail::accessor_policies::str_attr>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:200:52: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2096:44: error: no matching function for call to 'collect_arguments()'
return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
simple_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
unpacking_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'pybind11::object pybind11::detail::object_api<Derived>::operator()(Args&& ...) const [with pybind11::return_value_policy policy = (pybind11::return_value_policy)1u; Args = {pybind11::handle, pybind11::handle, pybind11::none, pybind11::str}; Derived = pybind11::handle]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:964:158: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2096:44: error: no matching function for call to 'collect_arguments(pybind11::handle, pybind11::handle, pybind11::none, pybind11::str)'
return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
simple_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
unpacking_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'pybind11::object pybind11::detail::object_api<Derived>::operator()(Args&& ...) const [with pybind11::return_value_policy policy = (pybind11::return_value_policy)1u; Args = {pybind11::tuple&}; Derived = pybind11::detail::accessor<pybind11::detail::accessor_policies::str_attr>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1720:39: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2096:44: error: no matching function for call to 'collect_arguments(pybind11::tuple&)'
return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
simple_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
unpacking_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'pybind11::object pybind11::detail::object_api<Derived>::operator()(Args&& ...) const [with pybind11::return_value_policy policy = (pybind11::return_value_policy)1u; Args = {pybind11::object&}; Derived = pybind11::detail::accessor<pybind11::detail::accessor_policies::str_attr>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1738:11: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2096:44: error: no matching function for call to 'collect_arguments(pybind11::object&)'
return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
simple_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
unpacking_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'pybind11::object pybind11::detail::object_api<Derived>::operator()(Args&& ...) const [with pybind11::return_value_policy policy = (pybind11::return_value_policy)1u; Args = {pybind11::object}; Derived = pybind11::detail::accessor<pybind11::detail::accessor_policies::str_attr>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:1739:64: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2096:44: error: no matching function for call to 'collect_arguments(pybind11::object)'
return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
simple_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
unpacking_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'pybind11::object pybind11::detail::object_api<Derived>::operator()(Args&& ...) const [with pybind11::return_value_policy policy = (pybind11::return_value_policy)1u; Args = {const char* const&}; Derived = pybind11::detail::accessor<pybind11::detail::accessor_policies::str_attr>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:1333:35: required from 'bool pybind11::detail::object_api<Derived>::contains(T&&) const [with T = const char* const&; Derived = pybind11::handle]'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/detail/internals.h:170:25: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2096:44: error: no matching function for call to 'collect_arguments(const char* const&)'
return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
simple_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
unpacking_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'int pybind11::cast(pybind11::object&&) [with T = std::basic_string<char>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1705:68: required from 'T pybind11::object::cast() && [with T = std::basic_string<char>]'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/detail/class.h:537:138: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:1701:24: error: cannot convert 'std::basic_string<char>' to 'int' in return
return cast<T>(object);
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h: In instantiation of 'pybind11::object pybind11::detail::object_api<Derived>::operator()(Args&& ...) const [with pybind11::return_value_policy policy = (pybind11::return_value_policy)1u; Args = {pybind11::handle&, pybind11::handle&}; Derived = pybind11::detail::accessor<pybind11::detail::accessor_policies::str_attr>]':
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pytypes.h:884:28: required from 'pybind11::str pybind11::str::format(Args&& ...) const [with Args = {pybind11::handle&, pybind11::handle&}]'
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/pybind11.h:749:72: required from here
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2096:44: error: no matching function for call to 'collect_arguments(pybind11::handle&, pybind11::handle&)'
return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
simple_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2075:1: note: template argument deduction/substitution failed:
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
unpacking_collector<policy> collect_arguments(Args &&...args) {
^
/usr/local/lib/python3.5/dist-packages/torch/lib/include/pybind11/cast.h:2082:1: note: template argument deduction/substitution failed:
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1
This also happens with Python 3.6.
I have a similar configuration as yours (CUDA 9.0 on Ubuntu 16, and pytorch 1.0.1). I also faced similar errors. There seems to be an issue with some of the recent commits. As the installation works when I install it with a commit from Feb 16th (37cd5dfdf59a9f984863cc99ba7b9c3c4df8a618).
Can you try installing pytorch using official installation command
pip3 install https://download.pytorch.org/whl/cu90/torch-1.0.1-cp36-cp36m-win_amd64.whl
https://pytorch.org/
Also, you can use pytorch docker images from dockerhub (they are cuda 10 though)
Nvcc 9.0 doesn鈥檛 like torch/extension.h, apparently. Maybe pybind11 stuff that comes in through extension.h has some advanced c++11 usage that nvcc 9.0 can鈥檛 handle. @ngimel realized this and removed extension.h from multi_tensor_scale_kernel.cu, where nvcc was choking on it (extension.h doesn鈥檛 actually need to be present there). This should fix your issue.
I'm going to close this because @ngimel's PR fixed it for us. If the error persists for you, please reopen.
Most helpful comment
I have a similar configuration as yours (CUDA 9.0 on Ubuntu 16, and pytorch 1.0.1). I also faced similar errors. There seems to be an issue with some of the recent commits. As the installation works when I install it with a commit from Feb 16th (37cd5dfdf59a9f984863cc99ba7b9c3c4df8a618).