Closed MSC19950601 closed 4 years ago
I am making a new version. which is in PR https://github.com/zhanghang1989/PyTorch-Encoding/pull/256 with new setup instructions.
This new PR will be merged soon. Let me know if you still have the issue.
I'm sorry, I still met some bugs. My env is Ubuntu 18.04, torch 1.4.0, CUDA 10.1. I install torch-encoding by github source, the whole install progress is fine. But when I install lib/gpu (enclib_gpu) manually, I meet some bugs. Here is the log.
running install running bdist_egg running egg_info writing enclib_gpu.egg-info/PKG-INFO writing dependency_links to enclib_gpu.egg-info/dependency_links.txt writing top-level names to enclib_gpu.egg-info/top_level.txt reading manifest file 'enclib_gpu.egg-info/SOURCES.txt' writing manifest file 'enclib_gpu.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'enclib_gpu' extension gcc -pthread -B /home/kururu/anaconda3/envs/kururudev-torchdev/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/TH -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/kururu/anaconda3/envs/kururudev-torchdev/include/python3.6m -c operator.cpp -o build/temp.linux-x86_64-3.6/operator.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=enclib_gpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ /usr/local/cuda/bin/nvcc -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/TH -I/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/kururu/anaconda3/envs/kururudev-torchdev/include/python3.6m -c activation_kernel.cu -o build/temp.linux-x86_64-3.6/activation_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=enclib_gpu -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++11 /home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/c10/core/TensorTypeSet.h(44): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(14): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(15): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(15): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(15): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(18): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(19): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(19): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(19): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(23): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(24): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(24): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/padding.h(24): warning: integer conversion resulted in a change of sign
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/autograd/profiler.h(97): warning: attribute "visibility" does not apply here
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/autograd/profiler.h(112): warning: attribute "visibility" does not apply here
/home/kururu/anaconda3/envs/kururudev-torchdev/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/enum.h(179): warning: statement is unreachable
activation_kernel.cu(20): error: host or device annotation on lambda requires --expt-extended-lambda nvcc flag
activation_kernel.cu(21): error: host or device annotation on lambda requires --expt-extended-lambda nvcc flag
activation_kernel.cu(23): error: host or device annotation on lambda requires --expt-extended-lambda nvcc flag
activation_kernel.cu(24): error: host or device annotation on lambda requires --expt-extended-lambda nvcc flag
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->double", defined at activation_kernel.cu:20) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->nv_bool", defined at activation_kernel.cu:21) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->double", defined at activation_kernel.cu:20) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->nv_bool", defined at activation_kernel.cu:21) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->double", defined at activation_kernel.cu:23) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->nv_bool", defined at activation_kernel.cu:24) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->double", defined at activation_kernel.cu:23) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const double &)->nv_bool", defined at activation_kernel.cu:24) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->float", defined at activation_kernel.cu:20) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->nv_bool", defined at activation_kernel.cu:21) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->float", defined at activation_kernel.cu:20) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->nv_bool", defined at activation_kernel.cu:21) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->float", defined at activation_kernel.cu:23) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->nv_bool", defined at activation_kernel.cu:24) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->float", defined at activation_kernel.cu:23) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
/usr/local/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h(926): error: The closure type for a lambda ("lambda [](const float &)->nv_bool", defined at activation_kernel.cu:24) cannot be used in the template argument type of a global function template instantiation, unless the lambda is defined within a device or global function, or the lambda is an 'extended lambda' and the flag --expt-extended-lambda is specified
detected during:
instantiation of "thrust::cuda_cub::core::_kernel_agent" based on template arguments <thrust::cuda_cub::parallel_for::ParallelForAgent<thrust::cuda_cub::transform::unary_transform_f<thrust::device_ptr
20 errors detected in the compilation of "/tmp/tmpxft_00006a79_00000000-6_activation_kernel.cpp1.ii". error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1
Also when I only use encoding.nn.SyncBatchNorm for model test, my process of python script hangs on, fill GPU memory bu no computing use.
BTW, I only install ninja 1.8.2 in my python env but not install in my system, is it matter?
I am not expert in system setup. I haven't tried ubuntu 18.04 or cuda 10.1.
My setting is ubuntu 16.04 and cuda 10.0 with pytorch 1.4.0. With the same setup, you may follow the setup steps here: https://hangzhang.org/PyTorch-Encoding/notes/compile.html
Thank you for your patient explanation. However, when I follow your installation, the situation didn't change. When I only use encoding.nn.SyncBatchNorm for model test, my process of python script hangs on, fill GPU memory bu no computing use.
That's wired. https://github.com/zhanghang1989/PyTorch-Encoding/blob/master/encoding/nn/syncbn.py#L175-L176
The eval mode should use the standard BN forward.
Are you using the most recent version of the code?
Could you try
pip install torch-encoding --pre
which installs the most recent version
Thanks for your patient explanation. What I used is the most recent version.
Is your issue related to PyCharm like this https://github.com/zhanghang1989/PyTorch-Encoding/issues/260
activation_kernel.cu(21):error:host or device annotation on lambda requires --expt-extended-lambda nvcc flag
what is the problem?
Originally posted by @zhuizhunew in https://github.com/zhanghang1989/PyTorch-Encoding/issues/66#issuecomment-520147082
same issue!