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

无法编译CogDL中的快速算子库 #410

Open
fixtech opened this issue Jan 10, 2023 · 1 comment
Open

无法编译CogDL中的快速算子库 #410

fixtech opened this issue Jan 10, 2023 · 1 comment

Comments

@fixtech
Copy link

fixtech commented Jan 10, 2023

源码编译,然后在运行时,发现没有调用cogdl/cogdl/operators/中相关的算子,例如GCN算法中,使用的spmm_scatter,而不是使用spmm/spmm_kernel.cu中的算子
pdb调试发现cogdl/operators/spmm.py:12,有个try: except;try失败,从而csrspmm = None

此处try的报错为:
RuntimeError: Error building extension 'spmm': [1/2] c++ -MMD -MF spmm.o.d -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1013" -isystem /usr/local/lib/python3.8/dist-packages/torch/include -isystem /usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/lib/python3.8/dist-packages/torch/include/TH -isystem /usr/local/lib/python3.8/dist-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /LARGE_RAID_DISK/home/s00555996/06_CogDL/cogdl/cogdl/operators/spmm/spmm.cpp -o spmm.o
FAILED: spmm.o
c++ -MMD -MF spmm.o.d -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1013" -isystem /usr/local/lib/python3.8/dist-packages/torch/include -isystem /usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/lib/python3.8/dist-packages/torch/include/TH -isystem /usr/local/lib/python3.8/dist-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /LARGE_RAID_DISK/home/s00555996/06_CogDL/cogdl/cogdl/operators/spmm/spmm.cpp -o spmm.o
In file included from /usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/Device.h:3:0,
from /usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include/torch/python.h:8,
from /usr/local/lib/python3.8/dist-packages/torch/include/torch/extension.h:6,
from /LARGE_RAID_DISK/home/s00555996/06_CogDL/cogdl/cogdl/operators/spmm/spmm.cpp:1:
/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/python_headers.h:10:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Environment

  • OS: ubuntu 18.04
  • Python version: 3.8
  • PyTorch version: 1.12.0+cu116
  • CUDA/cuDNN version: 116
  • How did you try to install CogDL (wheel, source):source
  • Any other relevant information:
@cenyk1230
Copy link
Member

cenyk1230 commented Jan 12, 2023

Hi @fixtech,

Please check the nvcc version through nvcc -V.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants