Open NewDriverLee opened 1 year ago
Try to modify the content of line 1865 in cpp_extension.py is: command=['ninja ',' -- version '] This may be an exception caused by python compatibility issues
Try to modify the content of line 1865 in cpp_extension.py is: command=['ninja ',' -- version '] This may be an exception caused by python compatibility issues
Thank you very much for your reply. I have modified the cpp_extension.py as you suggested but a new error arose. The error information is as follows. It seems that it did not find the two files "scale_mask_softmax_kernel.o" and "scale_mask_softmax_wrapper.o" in the directory "/home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc". Actually, I have checked that there was no file in such directory.
Processing /home/liwj/project/EnergonAI_github
Preparing metadata (setup.py) ... done
Building wheels for collected packages: energonai
Building wheel for energonai (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [83 lines of output]
torch.__version__ = 1.13.1
Compiling cuda extensions with
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_Mar__8_18:18:20_PST_2022
Cuda compilation tools, release 11.6, V11.6.124
Build cuda_11.6.r11.6/compiler.31057947_0
from /home/liwj/miniconda3/envs/py3.10/bin
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/energonai
copying energonai/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/batch_mgr.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/engine.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/pipe.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/task.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/worker.py -> build/lib.linux-x86_64-cpython-310/energonai
creating build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/collective.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/p2p.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/ring.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/utils.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
creating build/lib.linux-x86_64-cpython-310/energonai/kernel
copying energonai/kernel/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel
creating build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
copying energonai/legacy_batch_mgr/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
copying energonai/legacy_batch_mgr/dynamic_batch_manager.py -> build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
copying energonai/legacy_batch_mgr/naive_batch_manager.py -> build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
creating build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/attention.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/downstream.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/embedding.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/endecoder.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/mlp.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/model_factory.py -> build/lib.linux-x86_64-cpython-310/energonai/model
creating build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/energon_tracer.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/split_method.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/split_policy.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
creating build/lib.linux-x86_64-cpython-310/energonai/testing
copying energonai/testing/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/testing
copying energonai/testing/models.py -> build/lib.linux-x86_64-cpython-310/energonai/testing
creating build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/checkpointing.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/checkpointing_hf_gpt2.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/checkpointing_opt.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/common.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/files.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/timer.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
creating build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/layer_norm.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/linear_func.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/scale_mask_softmax.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/transpose_pad.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
running build_ext
building 'energonai_scale_mask' extension
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc
Emitting ninja build file /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.1.git.kitware.jobserver-1
g++ -pthread -B /home/liwj/miniconda3/envs/py3.10/compiler_compat -shared -Wl,-rpath,/home/liwj/miniconda3/envs/py3.10/lib -Wl,-rpath-link,/home/liwj/miniconda3/envs/py3.10/lib -L/home/liwj/miniconda3/envs/py3.10/lib -Wl,-rpath,/home/liwj/miniconda3/envs/py3.10/lib -Wl,-rpath-link,/home/liwj/miniconda3/envs/py3.10/lib -L/home/liwj/miniconda3/envs/py3.10/lib /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_kernel.o /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_wrapper.o -L/home/liwj/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/lib -L/home/liwj/miniconda3/envs/py3.10/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-cpython-310/energonai_scale_mask.cpython-310-x86_64-linux-gnu.so
g++: error: /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_kernel.o: No such file or directory
g++: error: /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_wrapper.o: No such file or directory
error: command '/usr/bin/g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for energonai
Running setup.py clean for energonai
Failed to build energonai
Installing collected packages: energonai
Running setup.py install for energonai ... error
error: subprocess-exited-with-error
× Running setup.py install for energonai did not run successfully.
│ exit code: 1
╰─> [85 lines of output]
torch.__version__ = 1.13.1
Compiling cuda extensions with
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_Mar__8_18:18:20_PST_2022
Cuda compilation tools, release 11.6, V11.6.124
Build cuda_11.6.r11.6/compiler.31057947_0
from /home/liwj/miniconda3/envs/py3.10/bin
running install
/home/liwj/miniconda3/envs/py3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/energonai
copying energonai/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/batch_mgr.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/engine.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/pipe.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/task.py -> build/lib.linux-x86_64-cpython-310/energonai
copying energonai/worker.py -> build/lib.linux-x86_64-cpython-310/energonai
creating build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/collective.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/p2p.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/ring.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
copying energonai/communication/utils.py -> build/lib.linux-x86_64-cpython-310/energonai/communication
creating build/lib.linux-x86_64-cpython-310/energonai/kernel
copying energonai/kernel/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel
creating build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
copying energonai/legacy_batch_mgr/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
copying energonai/legacy_batch_mgr/dynamic_batch_manager.py -> build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
copying energonai/legacy_batch_mgr/naive_batch_manager.py -> build/lib.linux-x86_64-cpython-310/energonai/legacy_batch_mgr
creating build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/attention.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/downstream.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/embedding.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/endecoder.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/mlp.py -> build/lib.linux-x86_64-cpython-310/energonai/model
copying energonai/model/model_factory.py -> build/lib.linux-x86_64-cpython-310/energonai/model
creating build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/energon_tracer.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/split_method.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
copying energonai/pipelinable/split_policy.py -> build/lib.linux-x86_64-cpython-310/energonai/pipelinable
creating build/lib.linux-x86_64-cpython-310/energonai/testing
copying energonai/testing/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/testing
copying energonai/testing/models.py -> build/lib.linux-x86_64-cpython-310/energonai/testing
creating build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/checkpointing.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/checkpointing_hf_gpt2.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/checkpointing_opt.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/common.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/files.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
copying energonai/utils/timer.py -> build/lib.linux-x86_64-cpython-310/energonai/utils
creating build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/__init__.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/layer_norm.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/linear_func.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/scale_mask_softmax.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
copying energonai/kernel/cuda_native/transpose_pad.py -> build/lib.linux-x86_64-cpython-310/energonai/kernel/cuda_native
running build_ext
building 'energonai_scale_mask' extension
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native
creating /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc
Emitting ninja build file /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.1.git.kitware.jobserver-1
g++ -pthread -B /home/liwj/miniconda3/envs/py3.10/compiler_compat -shared -Wl,-rpath,/home/liwj/miniconda3/envs/py3.10/lib -Wl,-rpath-link,/home/liwj/miniconda3/envs/py3.10/lib -L/home/liwj/miniconda3/envs/py3.10/lib -Wl,-rpath,/home/liwj/miniconda3/envs/py3.10/lib -Wl,-rpath-link,/home/liwj/miniconda3/envs/py3.10/lib -L/home/liwj/miniconda3/envs/py3.10/lib /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_kernel.o /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_wrapper.o -L/home/liwj/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/lib -L/home/liwj/miniconda3/envs/py3.10/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-cpython-310/energonai_scale_mask.cpython-310-x86_64-linux-gnu.so
g++: error: /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_kernel.o: No such file or directory
g++: error: /home/liwj/project/EnergonAI_github/build/temp.linux-x86_64-cpython-310/energonai/kernel/cuda_native/csrc/scale_mask_softmax_wrapper.o: No such file or directory
error: command '/usr/bin/g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> energonai
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Could you provide more information about your OS, CUDA version and gcc version? By the way, you can run pip install -v .
to get detail output.
I use anaconda, python 3.10 and pytorch 1.13.1 .
When I ran the following Installation command: pip install . an error happened. Part of the error message is: