pytorch / torchrec

Pytorch domain library for recommendation systems
https://pytorch.org/torchrec/
BSD 3-Clause "New" or "Revised" License
1.93k stars 426 forks source link

An error occurred while building with CMake. #116

Closed jiapei100 closed 2 years ago

jiapei100 commented 2 years ago

Failed to buid torchrec from source ...

My ENV:

➜  ~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:    20.04
Codename:   focal
➜  ~ uname -r
5.13.0-30-generic
➜  ~ python --version
Python 3.8.10
➜  ~ gcc --version
gcc (GCC) 10.3.1 20210627
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

➜  ~ pip --version
pip 22.0.3 from ~/.local/lib/python3.8/site-packages/pip (python 3.8)
➜  ~ 
➜  torchrec git:(main) ✗ python setup.py build
['setup.py', 'build']
args:  Namespace(TORCH_CUDA_ARCH_LIST='7.5', cpu_only=False, package_name='torchrec', skip_fbgemm=False)
unknown:  ['build']
name:  torchrec
-- torchrec building version: 0.1.0
Installing fbgemm_gpu
TORCH_CUDA_ARCH_LIST:  7.5
cpu_only: False
-------------------------------------------------------------
The project is built using scikit-build
-------------------------------------------------------------
  File "~/.local/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 595, in setup
    cmkr.make(make_args, env=env)
  File "~/.local/lib/python3.8/site-packages/skbuild/cmaker.py", line 609, in make
    raise SKBuildError(
An error occurred while building with CMake.
  Command:
    cmake --build . --target install --config Release --
  Source directory:
    ....../torchrec/third_party/fbgemm/fbgemm_gpu
  Working directory:
    ....../torchrec/third_party/fbgemm/fbgemm_gpu/_skbuild/linux-x86_64-3.8/cmake-build
Please see CMake's output for more information.
Traceback (most recent call last):
  File "setup.py", line 166, in <module>
    main(sys.argv[1:])
  File "setup.py", line 110, in main
    out = check_output(
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python', 'setup.py', 'build', '-DTORCH_CUDA_ARCH_LIST=7.5']' returned non-zero exit status 1.
colin2328 commented 2 years ago

cc @jianyuh -> @jiapei100 is having trouble installing fbgemm on 7.5 CUDA_ARCH, if you have any advice

jianyuh commented 2 years ago

@jiapei100 Do you have full error message? I was previously able to build FBGEMM in AWS g4dn instance with T4 GPU (SM75). The FBGEMM building instruction is

python setup.py install -DTORCH_CUDA_ARCH_LIST="7.5"

in fbgemm_gpu folder in https://github.com/pytorch/FBGEMM/tree/main/fbgemm_gpu

colin2328 commented 2 years ago

@jiapei100 -> closing this issue as we haven't heard from you, feel free to reopen if you still need help