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

installation error #1116

Open alexanderuo opened 3 years ago

alexanderuo commented 3 years ago

environment: python=3.7 pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 pillow==6.0.0 CUDA Version 9.0.176

error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1 Running setup.py install for apex ... error ERROR: Command errored out with exit status 1: /users/guozibin/.conda/envs/semseg/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"'; file='"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-_g4w4je2/install-record.txt --single-version-externally-managed --compile --install-headers /users/guozibin/.conda/envs/semseg/include/python3.7m/apex Check the logs for full command output.

Here are the details:

pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ /users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/commands/install.py:232: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option. cmdoptions.check_install_build_global(options) Using pip 21.1.1 from /users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip (python 3.7) Non-user install because site-packages writeable Created temporary directory: /tmp/pip-ephem-wheel-cache-q0f_860l Created temporary directory: /tmp/pip-req-tracker-om87971x Initialized build tracking at /tmp/pip-req-tracker-om87971x Created build tracker: /tmp/pip-req-tracker-om87971x Entered build tracker: /tmp/pip-req-tracker-om87971x Created temporary directory: /tmp/pip-install-ur1nnh71 Processing /users/guozibin/dukaiyang/environment/apex-master Created temporary directory: /tmp/pip-req-build-y4l8yvdr DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default. pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555. Added file:///users/guozibin/dukaiyang/environment/apex-master to build tracker '/tmp/pip-req-tracker-om87971x' Running setup.py (path:/tmp/pip-req-build-y4l8yvdr/setup.py) egg_info for package from file:///users/guozibin/dukaiyang/environment/apex-master Created temporary directory: /tmp/pip-pip-egg-info-8iwf3eg2 Running command python setup.py egg_info

torch.__version__  = 1.0.1.post2

running egg_info
creating /tmp/pip-pip-egg-info-8iwf3eg2/apex.egg-info
writing /tmp/pip-pip-egg-info-8iwf3eg2/apex.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-8iwf3eg2/apex.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-8iwf3eg2/apex.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-8iwf3eg2/apex.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-8iwf3eg2/apex.egg-info/SOURCES.txt'
writing manifest file '/tmp/pip-pip-egg-info-8iwf3eg2/apex.egg-info/SOURCES.txt'
/tmp/pip-req-build-y4l8yvdr/setup.py:67: UserWarning: Option --pyprof not specified. Not installing PyProf dependencies!
  warnings.warn("Option --pyprof not specified. Not installing PyProf dependencies!")

Source in /tmp/pip-req-build-y4l8yvdr has version 0.1, which satisfies requirement apex==0.1 from file:///users/guozibin/dukaiyang/environment/apex-master Removed apex==0.1 from file:///users/guozibin/dukaiyang/environment/apex-master from build tracker '/tmp/pip-req-tracker-om87971x' Created temporary directory: /tmp/pip-unpack-2a8d2m7g Skipping wheel build for apex, due to binaries being disabled for it. Installing collected packages: apex Created temporary directory: /tmp/pip-record-_g4w4je2 Running command /users/guozibin/.conda/envs/semseg/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"'; file='"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-_g4w4je2/install-record.txt --single-version-externally-managed --compile --install-headers /users/guozibin/.conda/envs/semseg/include/python3.7m/apex

torch.__version__  = 1.0.1.post2

/tmp/pip-req-build-y4l8yvdr/setup.py:67: 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-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
from /usr/local/cuda/bin

running install
running build
running build_py
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/apex
copying apex/__init__.py -> build/lib.linux-x86_64-3.7/apex
creating build/lib.linux-x86_64-3.7/apex/normalization
copying apex/normalization/fused_layer_norm.py -> build/lib.linux-x86_64-3.7/apex/normalization
copying apex/normalization/__init__.py -> build/lib.linux-x86_64-3.7/apex/normalization
creating build/lib.linux-x86_64-3.7/apex/reparameterization
copying apex/reparameterization/__init__.py -> build/lib.linux-x86_64-3.7/apex/reparameterization
copying apex/reparameterization/reparameterization.py -> build/lib.linux-x86_64-3.7/apex/reparameterization
copying apex/reparameterization/weight_norm.py -> build/lib.linux-x86_64-3.7/apex/reparameterization
creating build/lib.linux-x86_64-3.7/apex/pyprof
copying apex/pyprof/__init__.py -> build/lib.linux-x86_64-3.7/apex/pyprof
creating build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/multiproc.py -> build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/__init__.py -> build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/sync_batchnorm.py -> build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/distributed.py -> build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/sync_batchnorm_kernel.py -> build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/LARC.py -> build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/optimized_sync_batchnorm_kernel.py -> build/lib.linux-x86_64-3.7/apex/parallel
copying apex/parallel/optimized_sync_batchnorm.py -> build/lib.linux-x86_64-3.7/apex/parallel
creating build/lib.linux-x86_64-3.7/apex/RNN
copying apex/RNN/models.py -> build/lib.linux-x86_64-3.7/apex/RNN
copying apex/RNN/cells.py -> build/lib.linux-x86_64-3.7/apex/RNN
copying apex/RNN/__init__.py -> build/lib.linux-x86_64-3.7/apex/RNN
copying apex/RNN/RNNBackend.py -> build/lib.linux-x86_64-3.7/apex/RNN
creating build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/utils.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/opt.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/scaler.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/amp.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/wrap.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/__init__.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/rnn_compat.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/__version__.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/_amp_state.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/frontend.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/handle.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/compat.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/_process_optimizer.py -> build/lib.linux-x86_64-3.7/apex/amp
copying apex/amp/_initialize.py -> build/lib.linux-x86_64-3.7/apex/amp
creating build/lib.linux-x86_64-3.7/apex/mlp
copying apex/mlp/mlp.py -> build/lib.linux-x86_64-3.7/apex/mlp
copying apex/mlp/__init__.py -> build/lib.linux-x86_64-3.7/apex/mlp
creating build/lib.linux-x86_64-3.7/apex/fp16_utils
copying apex/fp16_utils/loss_scaler.py -> build/lib.linux-x86_64-3.7/apex/fp16_utils
copying apex/fp16_utils/__init__.py -> build/lib.linux-x86_64-3.7/apex/fp16_utils
copying apex/fp16_utils/fp16util.py -> build/lib.linux-x86_64-3.7/apex/fp16_utils
copying apex/fp16_utils/fp16_optimizer.py -> build/lib.linux-x86_64-3.7/apex/fp16_utils
creating build/lib.linux-x86_64-3.7/apex/contrib
copying apex/contrib/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib
creating build/lib.linux-x86_64-3.7/apex/optimizers
copying apex/optimizers/fused_adam.py -> build/lib.linux-x86_64-3.7/apex/optimizers
copying apex/optimizers/fused_adagrad.py -> build/lib.linux-x86_64-3.7/apex/optimizers
copying apex/optimizers/__init__.py -> build/lib.linux-x86_64-3.7/apex/optimizers
copying apex/optimizers/fused_sgd.py -> build/lib.linux-x86_64-3.7/apex/optimizers
copying apex/optimizers/fused_novograd.py -> build/lib.linux-x86_64-3.7/apex/optimizers
copying apex/optimizers/fused_lamb.py -> build/lib.linux-x86_64-3.7/apex/optimizers
creating build/lib.linux-x86_64-3.7/apex/multi_tensor_apply
copying apex/multi_tensor_apply/__init__.py -> build/lib.linux-x86_64-3.7/apex/multi_tensor_apply
copying apex/multi_tensor_apply/multi_tensor_apply.py -> build/lib.linux-x86_64-3.7/apex/multi_tensor_apply
creating build/lib.linux-x86_64-3.7/apex/pyprof/parse
copying apex/pyprof/parse/kernel.py -> build/lib.linux-x86_64-3.7/apex/pyprof/parse
copying apex/pyprof/parse/__init__.py -> build/lib.linux-x86_64-3.7/apex/pyprof/parse
copying apex/pyprof/parse/__main__.py -> build/lib.linux-x86_64-3.7/apex/pyprof/parse
copying apex/pyprof/parse/db.py -> build/lib.linux-x86_64-3.7/apex/pyprof/parse
copying apex/pyprof/parse/nvvp.py -> build/lib.linux-x86_64-3.7/apex/pyprof/parse
copying apex/pyprof/parse/parse.py -> build/lib.linux-x86_64-3.7/apex/pyprof/parse
creating build/lib.linux-x86_64-3.7/apex/pyprof/nvtx
copying apex/pyprof/nvtx/nvmarker.py -> build/lib.linux-x86_64-3.7/apex/pyprof/nvtx
copying apex/pyprof/nvtx/__init__.py -> build/lib.linux-x86_64-3.7/apex/pyprof/nvtx
creating build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/usage.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/loss.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/embedding.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/__init__.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/utility.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/base.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/linear.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/pointwise.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/randomSample.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/__main__.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/recurrentCell.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/softmax.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/pooling.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/output.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/optim.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/blas.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/activation.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/index_slice_join_mutate.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/reduction.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/normalization.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/convert.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/prof.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/data.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/conv.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/misc.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
copying apex/pyprof/prof/dropout.py -> build/lib.linux-x86_64-3.7/apex/pyprof/prof
creating build/lib.linux-x86_64-3.7/apex/amp/lists
copying apex/amp/lists/tensor_overrides.py -> build/lib.linux-x86_64-3.7/apex/amp/lists
copying apex/amp/lists/__init__.py -> build/lib.linux-x86_64-3.7/apex/amp/lists
copying apex/amp/lists/functional_overrides.py -> build/lib.linux-x86_64-3.7/apex/amp/lists
copying apex/amp/lists/torch_overrides.py -> build/lib.linux-x86_64-3.7/apex/amp/lists
creating build/lib.linux-x86_64-3.7/apex/contrib/bottleneck
copying apex/contrib/bottleneck/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/bottleneck
copying apex/contrib/bottleneck/bottleneck.py -> build/lib.linux-x86_64-3.7/apex/contrib/bottleneck
copying apex/contrib/bottleneck/test.py -> build/lib.linux-x86_64-3.7/apex/contrib/bottleneck
creating build/lib.linux-x86_64-3.7/apex/contrib/transducer
copying apex/contrib/transducer/transducer.py -> build/lib.linux-x86_64-3.7/apex/contrib/transducer
copying apex/contrib/transducer/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/transducer
creating build/lib.linux-x86_64-3.7/apex/contrib/layer_norm
copying apex/contrib/layer_norm/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/layer_norm
copying apex/contrib/layer_norm/layer_norm.py -> build/lib.linux-x86_64-3.7/apex/contrib/layer_norm
creating build/lib.linux-x86_64-3.7/apex/contrib/xentropy
copying apex/contrib/xentropy/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/xentropy
copying apex/contrib/xentropy/softmax_xentropy.py -> build/lib.linux-x86_64-3.7/apex/contrib/xentropy
creating build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/fast_encdec_multihead_attn_norm_add_func.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/fast_encdec_multihead_attn_func.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/mask_softmax_dropout_func.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/fast_self_multihead_attn_func.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/encdec_multihead_attn_func.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/self_multihead_attn_func.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/encdec_multihead_attn.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/fast_self_multihead_attn_norm_add_func.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
copying apex/contrib/multihead_attn/self_multihead_attn.py -> build/lib.linux-x86_64-3.7/apex/contrib/multihead_attn
creating build/lib.linux-x86_64-3.7/apex/contrib/sparsity
copying apex/contrib/sparsity/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/sparsity
copying apex/contrib/sparsity/sparse_masklib.py -> build/lib.linux-x86_64-3.7/apex/contrib/sparsity
copying apex/contrib/sparsity/asp.py -> build/lib.linux-x86_64-3.7/apex/contrib/sparsity
creating build/lib.linux-x86_64-3.7/apex/contrib/groupbn
copying apex/contrib/groupbn/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/groupbn
copying apex/contrib/groupbn/batch_norm.py -> build/lib.linux-x86_64-3.7/apex/contrib/groupbn
creating build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/fused_adam.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/distributed_fused_adam_v2.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/distributed_fused_lamb.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/distributed_fused_adam.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/fused_sgd.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/fused_lamb.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/distributed_fused_adam_v3.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
copying apex/contrib/optimizers/fp16_optimizer.py -> build/lib.linux-x86_64-3.7/apex/contrib/optimizers
creating build/lib.linux-x86_64-3.7/apex/contrib/fmha
copying apex/contrib/fmha/__init__.py -> build/lib.linux-x86_64-3.7/apex/contrib/fmha
copying apex/contrib/fmha/fmha.py -> build/lib.linux-x86_64-3.7/apex/contrib/fmha
running build_ext
/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/utils/cpp_extension.py:191: UserWarning:

                               !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 4.9 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.

See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 4.9 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                              !! WARNING !!

  warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
building 'apex_C' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/csrc
gcc -pthread -B /users/guozibin/.conda/envs/semseg/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/TH -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/THC -I/users/guozibin/.conda/envs/semseg/include/python3.7m -c csrc/flatten_unflatten.cpp -o build/temp.linux-x86_64-3.7/csrc/flatten_unflatten.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=apex_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: 警告:command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [默认启用]
g++ -pthread -shared -B /users/guozibin/.conda/envs/semseg/compiler_compat -L/users/guozibin/.conda/envs/semseg/lib -Wl,-rpath=/users/guozibin/.conda/envs/semseg/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/csrc/flatten_unflatten.o -o build/lib.linux-x86_64-3.7/apex_C.cpython-37m-x86_64-linux-gnu.so
building 'amp_C' extension
gcc -pthread -B /users/guozibin/.conda/envs/semseg/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/TH -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/users/guozibin/.conda/envs/semseg/include/python3.7m -c csrc/amp_C_frontend.cpp -o build/temp.linux-x86_64-3.7/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: 警告:command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [默认启用]
/usr/local/cuda/bin/nvcc -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/TH -I/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/users/guozibin/.conda/envs/semseg/include/python3.7m -c csrc/multi_tensor_sgd_kernel.cu -o build/temp.linux-x86_64-3.7/csrc/multi_tensor_sgd_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --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
In file included from csrc/multi_tensor_sgd_kernel.cu:5:0:
csrc/multi_tensor_apply.cuh:5:32: 致命错误:c10/cuda/CUDAGuard.h:没有那个文件或目录
 #include <c10/cuda/CUDAGuard.h>
                                ^
编译中断。
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1
Running setup.py install for apex ... error

ERROR: Command errored out with exit status 1: /users/guozibin/.conda/envs/semseg/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"'; file='"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-_g4w4je2/install-record.txt --single-version-externally-managed --compile --install-headers /users/guozibin/.conda/envs/semseg/include/python3.7m/apex Check the logs for full command output. Exception information: Traceback (most recent call last): File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 820, in install req_description=str(self.req), File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/operations/install/legacy.py", line 81, in install raise LegacyInstallFailure pip._internal.operations.install.legacy.LegacyInstallFailure

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 180, in _main status = self.run(options, args) File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 204, in wrapper return func(self, options, args) File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 402, in run pycompile=options.compile, File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/req/init.py", line 85, in install_given_reqs pycompile=pycompile, File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 824, in install six.reraise(*exc.parent) File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_vendor/six.py", line 703, in reraise raise value File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/operations/install/legacy.py", line 71, in install cwd=unpacked_source_directory, File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 278, in runner spinner=spinner, File "/users/guozibin/.conda/envs/semseg/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 244, in call_subprocess raise InstallationSubprocessError(proc.returncode, command_desc) pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: /users/guozibin/.conda/envs/semseg/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"'; file='"'"'/tmp/pip-req-build-y4l8yvdr/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-_g4w4je2/install-record.txt --single-version-externally-managed --compile --install-headers /users/guozibin/.conda/envs/semseg/include/python3.7m/apex Check the logs for full command output. 1 location(s) to search for versions of pip:

ArghyaChatterjee commented 3 years ago

Are you able to solve the problem ?? I am also facing the same problem.

hongyujinn commented 3 years ago

I face the same problem