pytorch / FBGEMM

FB (Facebook) + GEMM (General Matrix-Matrix Multiplication) - https://code.fb.com/ml-applications/fbgemm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fbgemm_gpu build from source failed

geekboood opened this issue · comments

python setup.py install
['setup.py', 'install']
args:  Namespace(cpu_only=False, nvml_lib_path=None, package_name='fbgemm_gpu')
unknown:  ['install']
CUDA CUB directory environment variable not set.  Using default CUB location.
Using CUDA = /home/user/anaconda3/envs/pytorch
name:  fbgemm_gpu
-- fbgemm_gpu building version: 0.1.1
/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(


--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 9.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/FBGEMM/fbgemm_gpu/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------

Configuring Project
  Working directory:
    /home/user/FBGEMM/fbgemm_gpu/_skbuild/linux-x86_64-3.8/cmake-build
  Command:
    cmake /home/user/FBGEMM/fbgemm_gpu -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/home/user/FBGEMM/fbgemm_gpu/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/user/anaconda3/envs/pytorch/bin/python -DPYTHON_VERSION_STRING:STRING=3.8.13 -DPYTHON_INCLUDE_DIR:PATH=/home/user/anaconda3/envs/pytorch/include/python3.8 -DPYTHON_LIBRARY:FILEPATH=/home/user/anaconda3/envs/pytorch/lib/libpython3.8.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/skbuild/resources/cmake -DCMAKE_PREFIX_PATH=/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch -DGLIBCXX_USE_CXX11_ABI=0 -DCMAKE_BUILD_TYPE:STRING=Release

-------------------------------------------------------------
The project is built using scikit-build
-------------------------------------------------------------
-- USE_ROCM OFF
-- The CXX compiler identification is GNU 9.4.0
-- The C compiler identification is GNU 9.4.0
-- The CUDA compiler identification is NVIDIA 11.3.122
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /home/user/anaconda3/envs/pytorch/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /home/user/anaconda3/envs/pytorch (found version "11.3") 
-- Caffe2: CUDA detected: 11.3
-- Caffe2: CUDA nvcc is: /home/user/anaconda3/envs/pytorch/bin/nvcc
-- Caffe2: CUDA toolkit directory: /home/user/anaconda3/envs/pytorch
-- Caffe2: Header version is: 11.3
-- Found CUDNN: /home/user/anaconda3/envs/pytorch/lib/libcudnn.so  
-- Found cuDNN: v8.2.1  (include: /home/user/anaconda3/envs/pytorch/include, library: /home/user/anaconda3/envs/pytorch/lib/libcudnn.so)
-- /home/user/anaconda3/envs/pytorch/lib/libnvrtc.so shorthash is 9b19a752
-- Autodetected CUDA architecture(s):  6.1 6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
CMake Warning at /home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:42 (find_package)


-- Found Torch: /home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/lib/libtorch.so  
-- Found PythonInterp: /home/user/anaconda3/envs/pytorch/bin/python (found version "3.8.13") 
-- Found PythonLibs: /home/user/anaconda3/envs/pytorch/lib/libpython3.8.so (found version "3.8.13") 
 -D_GLIBCXX_USE_CXX11_ABI=0
-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "fbgemm_gpu_py".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/user/FBGEMM/fbgemm_gpu/_skbuild/linux-x86_64-3.8/cmake-build
[2/193] Building CUDA object CMakeFiles/fbgemm_gpu_py.dir/src/jagged_tensor_ops.cu.o
FAILED: CMakeFiles/fbgemm_gpu_py.dir/src/jagged_tensor_ops.cu.o 
/home/user/anaconda3/envs/pytorch/bin/nvcc -forward-unknown-to-host-compiler -DFBGEMM_CUB_USE_NAMESPACE -DUSE_C10D_GLOO -DUSE_C10D_NCCL -DUSE_DISTRIBUTED -DUSE_RPC -DUSE_TENSORPIPE -Dfbgemm_gpu_py_EXPORTS -I/home/user/FBGEMM/fbgemm_gpu -I/home/user/FBGEMM/fbgemm_gpu/include -I/home/user/FBGEMM/fbgemm_gpu/../include -I/home/user/FBGEMM/fbgemm_gpu/../third_party/asmjit/src -I/home/user/FBGEMM/fbgemm_gpu/../third_party/cpuinfo/include -isystem=/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/include -isystem=/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem=/home/user/anaconda3/envs/pytorch/include -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_61,code=sm_61 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=integer_sign_change,--diag_suppress=useless_using_declaration,--diag_suppress=set_but_not_used,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=implicit_return_from_non_void_function,--diag_suppress=unsigned_compare_with_zero,--diag_suppress=declared_but_not_referenced,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -O3 -DNDEBUG -Xcompiler=-fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17 --expt-relaxed-constexpr -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -MD -MT CMakeFiles/fbgemm_gpu_py.dir/src/jagged_tensor_ops.cu.o -MF CMakeFiles/fbgemm_gpu_py.dir/src/jagged_tensor_ops.cu.o.d -x cu -c /home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu -o CMakeFiles/fbgemm_gpu_py.dir/src/jagged_tensor_ops.cu.o
/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1172): error: identifier "scalar_t" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1177): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1177): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1177): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1169): error: identifier "AT_DISPATCH_CASE" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1182): error: expected a ")"

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1192): warning: parsing restarts here after previous syntax error

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1166): error: identifier "AT_DISPATCH_SWITCH" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1194): error: invalid start of member declaration

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1248): error: identifier "scalar_t" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1254): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1254): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1254): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1255): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1245): error: identifier "AT_DISPATCH_CASE" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1258): error: expected a ")"

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1266): warning: parsing restarts here after previous syntax error

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1242): error: identifier "AT_DISPATCH_SWITCH" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1268): error: invalid start of member declaration

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1331): error: identifier "scalar_t" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1336): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1336): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1336): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1328): error: identifier "AT_DISPATCH_CASE" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1341): error: expected a ")"

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1349): warning: parsing restarts here after previous syntax error

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1325): error: identifier "AT_DISPATCH_SWITCH" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1351): error: invalid start of member declaration

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1544): error: identifier "scalar_t" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1549): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1549): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1549): error: "scalar_t" is not a type name

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1541): error: identifier "AT_DISPATCH_CASE" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1554): error: expected a ")"

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1562): warning: parsing restarts here after previous syntax error

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1538): error: identifier "AT_DISPATCH_SWITCH" is undefined

/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu(1564): error: invalid start of member declaration

33 errors detected in the compilation of "/home/user/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops.cu".
[9/193] Building CUDA object CMakeFiles/fbgemm_gpu_py.dir/src/quantize_ops.cu.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 589, in setup
    cmkr.make(make_args, env=env)
  File "/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/skbuild/cmaker.py", line 496, in make
    raise SKBuildError(

An error occurred while building with CMake.
  Command:
    cmake --build . --target install --config Release --
  Source directory:
    /home/user/FBGEMM/fbgemm_gpu
  Working directory:
    /home/user/FBGEMM/fbgemm_gpu/_skbuild/linux-x86_64-3.8/cmake-build
Please see CMake's output for more information.

Any idea why this happened?

ok i switch to the release branch and the problem solved..
maybe some hint in the install guide could be useful