Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'amp_C' error for py3.9 pytorch2.1.0 cuda12.1 #1757

Closed
rocke2020 opened this issue Dec 7, 2023 · 1 comment
Closed

No module named 'amp_C' error for py3.9 pytorch2.1.0 cuda12.1 #1757

rocke2020 opened this issue Dec 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@rocke2020
Copy link

rocke2020 commented Dec 7, 2023

Describe the Bug
python
import amp_C
ModuleNotFoundError: No module named 'amp_C'
Minimal Steps/Code to Reproduce the Bug
python 3.9, torch 2.1.0, cuda 12.1, pip 23.3.1
git clone https://github.com/NVIDIA/apex

cd apex

if pip >= 23.1 (ref: https://pip.pypa.io/en/stable/news/#v23-1) which supports multiple --config-settings with the same key...
As my pip version is 23.3.1
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./

  1. from can't install apex #1594
    I installed apex-0.1 successfully, when I run "import amp_C" in python, the No module named 'amp_C' error.
  2. I had seen several No module named 'amp_C' issues, but none solved my problem.
    So, create a new No module named 'amp_C' issue on this exact env, pytorch 2.1 pip23.3.1
    thanks!!

Expected Behavior
apex can run normally in py3.9 pytorch2.1.0 cuda12.1, pip23.3.1 no error, to use deepspeed.

Environment
pip 23.3.1
PyTorch version: 2.1.0
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.9.18 (main, Sep 11 2023, 13:41:44) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-72-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA GeForce RTX 3090
GPU 1: NVIDIA GeForce RTX 3090

Nvidia driver version: 530.30.02
cuDNN version: Probably one of the following:
/usr/local/cuda-11.4/targets/x86_64-linux/lib/libcudnn.so.8.5.0
numpy==1.26.2

@rocke2020 rocke2020 added the bug Something isn't working label Dec 7, 2023
@rocke2020
Copy link
Author

strictly follow #1737 (comment)
I install apex successfully. The key is pip install with global option, even with pip 23.3
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

successful env
PyTorch 1.8.1
Python 3.8(ubuntu20.04)
Cuda 11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant