Issues with gcc when installing apex with CUDA support
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.5k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 3
Description
System config:
- OS: Fedora 30
- CUDA version: 10.2
- GPU: nVidia GTX1050(M)
Command:
python3 setup.py install --cuda_ext --cpp_ext --user
GCC compiler version > 7 is not supported, so I use gcc63 by creating symlinks as gcc63->gcc and g++63-> gcc. Result:
torch.__version__ = 1.2.0.dev20190622
Compiling cuda extensions with
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
from /usr/bin
running install
running bdist_egg
running 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
reading manifest file 'apex.egg-info/SOURCES.txt'
writing manifest file 'apex.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
/home/fuzzybatman/.local/lib/python3.7/site-packages/torch/utils/cpp_extension.py:167: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using g++, and then you can also use
g++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
platform=sys.platform))
building 'amp_C' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/fuzzybatman/.local/lib/python3.7/site-packages/torch/include -I/home/fuzzybatman/.local/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/fuzzybatman/.local/lib/python3.7/site-packages/torch/include/TH -I/home/fuzzybatman/.local/lib/python3.7/site-packages/torch/include/THC -I/usr/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
gcc: error: unrecognized command line option ‘-fstack-clash-protection’; did you mean ‘-fstack-protector’?
gcc: error: unrecognized command line option ‘-fcf-protection’; did you mean ‘-fstack-protector’?
error: command 'gcc' failed with exit status 1
How can I remove -fstack-clash-protection and -fcf-protection
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with setup.py and the PyTorch C++ extension build invoked by python3 setup.py install --cuda_ext --cpp_ext --user. Reproduce the reported compiler invocation and inspect where -fstack-clash-protection and -fcf-protection enter it. Done means the Apex CUDA installation completes with the reported compiler setup, without those unsupported options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python, pytorch
- Domain
- build-system, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100