NVIDIA / apex

A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
BSD 3-Clause "New" or "Revised" License
8.41k stars 1.4k forks source link

Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3 #470

Closed chm5174 closed 5 years ago

chm5174 commented 5 years ago

Hi, I’m having trouble when running my test.

A UserWarning was added to pytorch: "Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3. ","Please use new-style autograd function withstatic forward method.","(Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)".

I found the solution Update to new PyTorch Function API ("Legacy autograd function with non-static forward method is deprecated") #401 through Google and installed the whole Nvidia/apex accoding to the instructions.

I executed the follwoing commands for installing the apex: pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Here’s the full log:

` Created temporary directory: /tmp/pip-record-ltooag15 Running command /root/anaconda3/envs/pytorch/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-qv8b50ca/setup.py'"'"'; file='"'"'/tmp/pip-req-build-qv8b50ca/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-ltooag15/install-record.txt --single-version-externally-managed --compile torch.version = 1.2.0 /tmp/pip-req-build-qv8b50ca/setup.py:33: UserWarning: Option --pyprof not specified. Not installing PyProf dependencies! warnings.warn("Option --pyprof not specified. Not installing PyProf dependencies!")

Compiling cuda extensions with
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Tue_Jun_12_23:07:04_CDT_2018
Cuda compilation tools, release 9.2, V9.2.148
from /usr/local/cuda/bin

running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/apex
copying apex/__init__.py -> build/lib.linux-x86_64-3.6/apex
creating build/lib.linux-x86_64-3.6/apex/contrib
copying apex/contrib/__init__.py -> build/lib.linux-x86_64-3.6/apex/contrib
creating build/lib.linux-x86_64-3.6/apex/reparameterization
copying apex/reparameterization/weight_norm.py -> build/lib.linux-x86_64-3.6/apex/reparameterization
copying apex/reparameterization/__init__.py -> build/lib.linux-x86_64-3.6/apex/reparameterization
copying apex/reparameterization/reparameterization.py -> build/lib.linux-x86_64-3.6/apex/reparameterization
creating build/lib.linux-x86_64-3.6/apex/RNN
copying apex/RNN/RNNBackend.py -> build/lib.linux-x86_64-3.6/apex/RNN
copying apex/RNN/__init__.py -> build/lib.linux-x86_64-3.6/apex/RNN
copying apex/RNN/cells.py -> build/lib.linux-x86_64-3.6/apex/RNN
copying apex/RNN/models.py -> build/lib.linux-x86_64-3.6/apex/RNN
creating build/lib.linux-x86_64-3.6/apex/fp16_utils
copying apex/fp16_utils/loss_scaler.py -> build/lib.linux-x86_64-3.6/apex/fp16_utils
copying apex/fp16_utils/__init__.py -> build/lib.linux-x86_64-3.6/apex/fp16_utils
copying apex/fp16_utils/fp16util.py -> build/lib.linux-x86_64-3.6/apex/fp16_utils
copying apex/fp16_utils/fp16_optimizer.py -> build/lib.linux-x86_64-3.6/apex/fp16_utils
creating build/lib.linux-x86_64-3.6/apex/multi_tensor_apply
copying apex/multi_tensor_apply/__init__.py -> build/lib.linux-x86_64-3.6/apex/multi_tensor_apply
copying apex/multi_tensor_apply/multi_tensor_apply.py -> build/lib.linux-x86_64-3.6/apex/multi_tensor_apply
creating build/lib.linux-x86_64-3.6/apex/normalization
copying apex/normalization/__init__.py -> build/lib.linux-x86_64-3.6/apex/normalization
copying apex/normalization/fused_layer_norm.py -> build/lib.linux-x86_64-3.6/apex/normalization
creating build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/_amp_state.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/handle.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/__init__.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/amp.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/wrap.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/opt.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/compat.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/scaler.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/rnn_compat.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/_initialize.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/_process_optimizer.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/utils.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/__version__.py -> build/lib.linux-x86_64-3.6/apex/amp
copying apex/amp/frontend.py -> build/lib.linux-x86_64-3.6/apex/amp
creating build/lib.linux-x86_64-3.6/apex/optimizers
copying apex/optimizers/__init__.py -> build/lib.linux-x86_64-3.6/apex/optimizers
copying apex/optimizers/fused_lamb.py -> build/lib.linux-x86_64-3.6/apex/optimizers
copying apex/optimizers/fused_sgd.py -> build/lib.linux-x86_64-3.6/apex/optimizers
copying apex/optimizers/fused_adam.py -> build/lib.linux-x86_64-3.6/apex/optimizers
copying apex/optimizers/fp16_optimizer.py -> build/lib.linux-x86_64-3.6/apex/optimizers
copying apex/optimizers/fused_novograd.py -> build/lib.linux-x86_64-3.6/apex/optimizers
creating build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/optimized_sync_batchnorm_kernel.py -> build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/optimized_sync_batchnorm.py -> build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/distributed.py -> build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/multiproc.py -> build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/__init__.py -> build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/sync_batchnorm_kernel.py -> build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/sync_batchnorm.py -> build/lib.linux-x86_64-3.6/apex/parallel
copying apex/parallel/LARC.py -> build/lib.linux-x86_64-3.6/apex/parallel
creating build/lib.linux-x86_64-3.6/apex/pyprof
copying apex/pyprof/__init__.py -> build/lib.linux-x86_64-3.6/apex/pyprof
creating build/lib.linux-x86_64-3.6/apex/contrib/groupbn
copying apex/contrib/groupbn/batch_norm.py -> build/lib.linux-x86_64-3.6/apex/contrib/groupbn
copying apex/contrib/groupbn/__init__.py -> build/lib.linux-x86_64-3.6/apex/contrib/groupbn
creating build/lib.linux-x86_64-3.6/apex/contrib/xentropy
copying apex/contrib/xentropy/__init__.py -> build/lib.linux-x86_64-3.6/apex/contrib/xentropy
copying apex/contrib/xentropy/softmax_xentropy.py -> build/lib.linux-x86_64-3.6/apex/contrib/xentropy
creating build/lib.linux-x86_64-3.6/apex/amp/lists
copying apex/amp/lists/tensor_overrides.py -> build/lib.linux-x86_64-3.6/apex/amp/lists
copying apex/amp/lists/functional_overrides.py -> build/lib.linux-x86_64-3.6/apex/amp/lists
copying apex/amp/lists/__init__.py -> build/lib.linux-x86_64-3.6/apex/amp/lists
copying apex/amp/lists/torch_overrides.py -> build/lib.linux-x86_64-3.6/apex/amp/lists
creating build/lib.linux-x86_64-3.6/apex/pyprof/nvtx
copying apex/pyprof/nvtx/__init__.py -> build/lib.linux-x86_64-3.6/apex/pyprof/nvtx
copying apex/pyprof/nvtx/nvmarker.py -> build/lib.linux-x86_64-3.6/apex/pyprof/nvtx
creating build/lib.linux-x86_64-3.6/apex/pyprof/parse
copying apex/pyprof/parse/__init__.py -> build/lib.linux-x86_64-3.6/apex/pyprof/parse
copying apex/pyprof/parse/kernel.py -> build/lib.linux-x86_64-3.6/apex/pyprof/parse
copying apex/pyprof/parse/__main__.py -> build/lib.linux-x86_64-3.6/apex/pyprof/parse
copying apex/pyprof/parse/parse.py -> build/lib.linux-x86_64-3.6/apex/pyprof/parse
copying apex/pyprof/parse/db.py -> build/lib.linux-x86_64-3.6/apex/pyprof/parse
copying apex/pyprof/parse/nvvp.py -> build/lib.linux-x86_64-3.6/apex/pyprof/parse
creating build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/blas.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/pooling.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/embedding.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/usage.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/index_slice_join_mutate.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/randomSample.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/__init__.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/normalization.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/prof.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/loss.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/__main__.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/output.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/recurrentCell.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/reduction.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/dropout.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/data.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/activation.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/base.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/convert.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/conv.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/utility.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/pointwise.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/misc.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/linear.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/optim.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
copying apex/pyprof/prof/softmax.py -> build/lib.linux-x86_64-3.6/apex/pyprof/prof
running build_ext
building 'apex_C' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/csrc
gcc -pthread -B /root/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/flatten_unflatten.cpp -o build/temp.linux-x86_64-3.6/csrc/flatten_unflatten.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=apex_C -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++
g++ -pthread -shared -B /root/anaconda3/envs/pytorch/compiler_compat -L/root/anaconda3/envs/pytorch/lib -Wl,-rpath=/root/anaconda3/envs/pytorch/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/csrc/flatten_unflatten.o -o build/lib.linux-x86_64-3.6/apex_C.cpython-36m-x86_64-linux-gnu.so
building 'amp_C' extension
gcc -pthread -B /root/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/amp_C_frontend.cpp -o build/temp.linux-x86_64-3.6/csrc/amp_C_frontend.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -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/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_sgd_kernel.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_sgd_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_scale_kernel.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_scale_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_axpby_kernel.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_axpby_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_l2norm_kernel.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_l2norm_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_lamb_stage_1.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_lamb_stage_1.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_lamb_stage_2.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_lamb_stage_2.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_adam.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_adam.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_novograd.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_novograd.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/multi_tensor_lamb.cu -o build/temp.linux-x86_64-3.6/csrc/multi_tensor_lamb.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -lineinfo -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
g++ -pthread -shared -B /root/anaconda3/envs/pytorch/compiler_compat -L/root/anaconda3/envs/pytorch/lib -Wl,-rpath=/root/anaconda3/envs/pytorch/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/csrc/amp_C_frontend.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_sgd_kernel.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_scale_kernel.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_axpby_kernel.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_l2norm_kernel.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_lamb_stage_1.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_lamb_stage_2.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_adam.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_novograd.o build/temp.linux-x86_64-3.6/csrc/multi_tensor_lamb.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/amp_C.cpython-36m-x86_64-linux-gnu.so
building 'fused_adam_cuda' extension
gcc -pthread -B /root/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/fused_adam_cuda.cpp -o build/temp.linux-x86_64-3.6/csrc/fused_adam_cuda.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_adam_cuda -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/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/fused_adam_cuda_kernel.cu -o build/temp.linux-x86_64-3.6/csrc/fused_adam_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -O3 --use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_adam_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
g++ -pthread -shared -B /root/anaconda3/envs/pytorch/compiler_compat -L/root/anaconda3/envs/pytorch/lib -Wl,-rpath=/root/anaconda3/envs/pytorch/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/csrc/fused_adam_cuda.o build/temp.linux-x86_64-3.6/csrc/fused_adam_cuda_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/fused_adam_cuda.cpython-36m-x86_64-linux-gnu.so
building 'syncbn' extension
gcc -pthread -B /root/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/syncbn.cpp -o build/temp.linux-x86_64-3.6/csrc/syncbn.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=syncbn -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/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/welford.cu -o build/temp.linux-x86_64-3.6/csrc/welford.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=syncbn -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
g++ -pthread -shared -B /root/anaconda3/envs/pytorch/compiler_compat -L/root/anaconda3/envs/pytorch/lib -Wl,-rpath=/root/anaconda3/envs/pytorch/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/csrc/syncbn.o build/temp.linux-x86_64-3.6/csrc/welford.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/syncbn.cpython-36m-x86_64-linux-gnu.so
building 'fused_layer_norm_cuda' extension
gcc -pthread -B /root/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/layer_norm_cuda.cpp -o build/temp.linux-x86_64-3.6/csrc/layer_norm_cuda.o -O3 -DVERSION_GE_1_1 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_layer_norm_cuda -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/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/anaconda3/envs/pytorch/include/python3.6m -c csrc/layer_norm_cuda_kernel.cu -o build/temp.linux-x86_64-3.6/csrc/layer_norm_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -maxrregcount=50 -O3 --use_fast_math -DVERSION_GE_1_1 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_layer_norm_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
g++ -pthread -shared -B /root/anaconda3/envs/pytorch/compiler_compat -L/root/anaconda3/envs/pytorch/lib -Wl,-rpath=/root/anaconda3/envs/pytorch/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/csrc/layer_norm_cuda.o build/temp.linux-x86_64-3.6/csrc/layer_norm_cuda_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/fused_layer_norm_cuda.cpython-36m-x86_64-linux-gnu.so
running install_lib
copying build/lib.linux-x86_64-3.6/fused_adam_cuda.cpython-36m-x86_64-linux-gnu.so -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages
copying build/lib.linux-x86_64-3.6/syncbn.cpython-36m-x86_64-linux-gnu.so -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/groupbn
copying build/lib.linux-x86_64-3.6/apex/contrib/groupbn/batch_norm.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/groupbn
copying build/lib.linux-x86_64-3.6/apex/contrib/groupbn/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/groupbn
copying build/lib.linux-x86_64-3.6/apex/contrib/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/xentropy
copying build/lib.linux-x86_64-3.6/apex/contrib/xentropy/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/xentropy
copying build/lib.linux-x86_64-3.6/apex/contrib/xentropy/softmax_xentropy.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/xentropy
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/reparameterization
copying build/lib.linux-x86_64-3.6/apex/reparameterization/weight_norm.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/reparameterization
copying build/lib.linux-x86_64-3.6/apex/reparameterization/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/reparameterization
copying build/lib.linux-x86_64-3.6/apex/reparameterization/reparameterization.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/reparameterization
copying build/lib.linux-x86_64-3.6/apex/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN
copying build/lib.linux-x86_64-3.6/apex/RNN/RNNBackend.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN
copying build/lib.linux-x86_64-3.6/apex/RNN/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN
copying build/lib.linux-x86_64-3.6/apex/RNN/cells.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN
copying build/lib.linux-x86_64-3.6/apex/RNN/models.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils
copying build/lib.linux-x86_64-3.6/apex/fp16_utils/loss_scaler.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils
copying build/lib.linux-x86_64-3.6/apex/fp16_utils/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils
copying build/lib.linux-x86_64-3.6/apex/fp16_utils/fp16util.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils
copying build/lib.linux-x86_64-3.6/apex/fp16_utils/fp16_optimizer.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/multi_tensor_apply
copying build/lib.linux-x86_64-3.6/apex/multi_tensor_apply/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/multi_tensor_apply
copying build/lib.linux-x86_64-3.6/apex/multi_tensor_apply/multi_tensor_apply.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/multi_tensor_apply
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/normalization
copying build/lib.linux-x86_64-3.6/apex/normalization/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/normalization
copying build/lib.linux-x86_64-3.6/apex/normalization/fused_layer_norm.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/normalization
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/_amp_state.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/handle.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists
copying build/lib.linux-x86_64-3.6/apex/amp/lists/tensor_overrides.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists
copying build/lib.linux-x86_64-3.6/apex/amp/lists/functional_overrides.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists
copying build/lib.linux-x86_64-3.6/apex/amp/lists/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists
copying build/lib.linux-x86_64-3.6/apex/amp/lists/torch_overrides.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists
copying build/lib.linux-x86_64-3.6/apex/amp/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/amp.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/wrap.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/opt.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/compat.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/scaler.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/rnn_compat.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/_initialize.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/_process_optimizer.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/utils.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/__version__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
copying build/lib.linux-x86_64-3.6/apex/amp/frontend.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers
copying build/lib.linux-x86_64-3.6/apex/optimizers/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers
copying build/lib.linux-x86_64-3.6/apex/optimizers/fused_lamb.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers
copying build/lib.linux-x86_64-3.6/apex/optimizers/fused_sgd.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers
copying build/lib.linux-x86_64-3.6/apex/optimizers/fused_adam.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers
copying build/lib.linux-x86_64-3.6/apex/optimizers/fp16_optimizer.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers
copying build/lib.linux-x86_64-3.6/apex/optimizers/fused_novograd.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/optimized_sync_batchnorm_kernel.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/optimized_sync_batchnorm.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/distributed.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/multiproc.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/sync_batchnorm_kernel.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/sync_batchnorm.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
copying build/lib.linux-x86_64-3.6/apex/parallel/LARC.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/nvtx
copying build/lib.linux-x86_64-3.6/apex/pyprof/nvtx/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/nvtx
copying build/lib.linux-x86_64-3.6/apex/pyprof/nvtx/nvmarker.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/nvtx
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse
copying build/lib.linux-x86_64-3.6/apex/pyprof/parse/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse
copying build/lib.linux-x86_64-3.6/apex/pyprof/parse/kernel.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse
copying build/lib.linux-x86_64-3.6/apex/pyprof/parse/__main__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse
copying build/lib.linux-x86_64-3.6/apex/pyprof/parse/parse.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse
copying build/lib.linux-x86_64-3.6/apex/pyprof/parse/db.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse
copying build/lib.linux-x86_64-3.6/apex/pyprof/parse/nvvp.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse
copying build/lib.linux-x86_64-3.6/apex/pyprof/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof
creating /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/blas.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/pooling.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/embedding.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/usage.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/index_slice_join_mutate.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/randomSample.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/__init__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/normalization.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/prof.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/loss.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/__main__.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/output.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/recurrentCell.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/reduction.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/dropout.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/data.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/activation.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/base.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/convert.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/conv.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/utility.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/pointwise.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/misc.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/linear.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/optim.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex/pyprof/prof/softmax.py -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof
copying build/lib.linux-x86_64-3.6/apex_C.cpython-36m-x86_64-linux-gnu.so -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages
copying build/lib.linux-x86_64-3.6/fused_layer_norm_cuda.cpython-36m-x86_64-linux-gnu.so -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages
copying build/lib.linux-x86_64-3.6/amp_C.cpython-36m-x86_64-linux-gnu.so -> /root/anaconda3/envs/pytorch/lib/python3.6/site-packages
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/groupbn/batch_norm.py to batch_norm.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/groupbn/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/xentropy/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/contrib/xentropy/softmax_xentropy.py to softmax_xentropy.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/reparameterization/weight_norm.py to weight_norm.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/reparameterization/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/reparameterization/reparameterization.py to reparameterization.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN/RNNBackend.py to RNNBackend.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN/cells.py to cells.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/RNN/models.py to models.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils/loss_scaler.py to loss_scaler.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils/fp16util.py to fp16util.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/fp16_utils/fp16_optimizer.py to fp16_optimizer.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/multi_tensor_apply/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/multi_tensor_apply/multi_tensor_apply.py to multi_tensor_apply.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/normalization/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/normalization/fused_layer_norm.py to fused_layer_norm.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/_amp_state.py to _amp_state.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/handle.py to handle.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists/tensor_overrides.py to tensor_overrides.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists/functional_overrides.py to functional_overrides.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/lists/torch_overrides.py to torch_overrides.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/amp.py to amp.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/wrap.py to wrap.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/opt.py to opt.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/compat.py to compat.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/scaler.py to scaler.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/rnn_compat.py to rnn_compat.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/_initialize.py to _initialize.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/_process_optimizer.py to _process_optimizer.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/utils.py to utils.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/__version__.py to __version__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/amp/frontend.py to frontend.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers/fused_lamb.py to fused_lamb.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers/fused_sgd.py to fused_sgd.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers/fused_adam.py to fused_adam.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers/fp16_optimizer.py to fp16_optimizer.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/optimizers/fused_novograd.py to fused_novograd.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/optimized_sync_batchnorm_kernel.py to optimized_sync_batchnorm_kernel.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/optimized_sync_batchnorm.py to optimized_sync_batchnorm.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/distributed.py to distributed.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/multiproc.py to multiproc.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/sync_batchnorm_kernel.py to sync_batchnorm_kernel.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/sync_batchnorm.py to sync_batchnorm.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/parallel/LARC.py to LARC.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/nvtx/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/nvtx/nvmarker.py to nvmarker.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse/kernel.py to kernel.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse/__main__.py to __main__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse/parse.py to parse.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse/db.py to db.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/parse/nvvp.py to nvvp.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/blas.py to blas.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/pooling.py to pooling.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/embedding.py to embedding.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/usage.py to usage.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/index_slice_join_mutate.py to index_slice_join_mutate.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/randomSample.py to randomSample.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/__init__.py to __init__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/normalization.py to normalization.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/prof.py to prof.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/loss.py to loss.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/__main__.py to __main__.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/output.py to output.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/recurrentCell.py to recurrentCell.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/reduction.py to reduction.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/dropout.py to dropout.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/data.py to data.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/activation.py to activation.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/base.py to base.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/convert.py to convert.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/conv.py to conv.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/utility.py to utility.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/pointwise.py to pointwise.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/misc.py to misc.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/linear.py to linear.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/optim.py to optim.cpython-36.pyc
byte-compiling /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex/pyprof/prof/softmax.py to softmax.cpython-36.pyc
running install_egg_info
running egg_info
creating apex.egg-info
writing apex.egg-info/PKG-INFO
writing dependency_links to apex.egg-info/dependency_links.txt
writing top-level names to apex.egg-info/top_level.txt
writing manifest file 'apex.egg-info/SOURCES.txt'
reading manifest file 'apex.egg-info/SOURCES.txt'
writing manifest file 'apex.egg-info/SOURCES.txt'
Copying apex.egg-info to /root/anaconda3/envs/pytorch/lib/python3.6/site-packages/apex-0.1-py3.6.egg-info
running install_scripts
writing list of installed files to '/tmp/pip-record-ltooag15/install-record.txt'

Running setup.py install for apex ... done Removing source in /tmp/pip-req-build-qv8b50ca Successfully installed apex-0.1 Cleaning up... Removed build tracker '/tmp/pip-req-tracker-f0xk6je4' 1 location(s) to search for versions of pip:

It seems that the installation was successful through Successfully installed apex-0.1 but it didn’t work, the test still goes wrong and a warning appears:/opt/conda/condabld/pytorch_1565287148058/work/torch/csrc/autograd/python_function.cpp:638: UserWarning: Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)

Is it where I am not doing it properly? Could you please help me? Thanks a lot!

ptrblck commented 5 years ago

Hi @chm5174,

which line of code throws this warning? Is it an internal apex method or does this warning come from your custom Function?

chm5174 commented 5 years ago

Thank you for your reply. I am running my test on pycharm and it only raised a warning,

/opt/conda/condabld/pytorch_1565287148058/work/torch/csrc/autograd/python_function.cpp:638: UserWarning: Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)

but didn't prompt which line of my code was wrong. In addition, my code didn't run out of results.

ZLeopard commented 5 years ago

@chm5174 i meet this too, are you get the answer??? my code is work, but raise many warning like that, i cant figure it out...

ZLeopard commented 5 years ago

my setting: Pytorch1.2 Apex 1.0 Cuda 10.1

MindExp commented 5 years ago

Hi @chm5174,

which line of code throws this warning? Is it an internal apex method or does this warning come from your custom Function?

it comes form the custom 'Fuction' as follow:

class GradReverse(Function):
    def __init__(self, lambd):
        self.lambd = lambd

    def forward(self, x):
        return x.view_as(x)

    def backward(self, grad_output):
        return -self.lambd * grad_output

when we backward our loss, the UserWarning comes out

mcarilli commented 5 years ago

^ That definitely has nothing to do with Apex. You need to apply the @staticmethod decorator to your forward and backward functions. I believe all custom autograd functions in Apex have already done so.

Please reopen if you find that adding Apex causes new warnings to appear.