Open fixtech opened 1 year ago
源码编译,然后在运行时,发现没有调用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
^~~~~~~~~~
compilation terminated. ninja: build stopped: subcommand failed.
Hi @fixtech,
Please check the nvcc version through nvcc -V.
nvcc -V
源码编译,然后在运行时,发现没有调用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
compilation terminated. ninja: build stopped: subcommand failed.
Environment