NVIDIA / apex

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

Install apex without ninja #1665

Open ustcwhy opened 1 year ago

ustcwhy commented 1 year ago

Describe the Bug

I try to install apex following pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./. However, it reports subprocess.CalledProcessError: Command ‘[‘ninja‘, ‘-v‘]‘ returned non-zero exit status 1. I modify "-v" with "--version", it seems missing xxx.o files. I try to install apex without ninja.

I replace BuildExtension with BuildExtension.with_options(use_ninja=False) in line 771 of the setup.py. It still reports:

error: command '/home/xxx/usr/local/gcc-7.5.0/bin/gcc' failed with exit code 1 error: subprocess-exited-with-error

Expected Behavior

I wonder how to install apex without ninja.

Environment

PyTorch version: 1.12.0+cu113 Is debug build: False CUDA used to build PyTorch: 11.3 ROCM used to build PyTorch: N/A

OS: Ubuntu 16.04.7 LTS (x86_64) GCC version: (GCC) 7.5.0 Clang version: Could not collect CMake version: version 3.26.3 Libc version: glibc-2.23

Python version: 3.10.11 (main, Apr 20 2023, 19:02:41) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.23 Is CUDA available: True CUDA runtime version: 10.0.130

abhishektyaagi commented 1 month ago

hi Were you able to fix this issue?