Nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified

Hello,

During I execute setup.py through pytorch, I faced the error “nvcc fatal : single input file is required for a non-link phase when an outputfile is specified”

Could you help me out solving the problem?

Code is like below.

import os
import re
import subprocess
import sys

from setuptools import setup
#from skbuild import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
#from torch.utils.cpp_extension import load

cxx_args = [‘-std=c++17’]
nvcc_args = [ ‘-gencode’, ‘arch=compute_50,code=sm_50’,
‘-gencode’, ‘arch=compute_52,code=sm_52’,
‘-gencode’, ‘arch=compute_60,code=sm_60’,
‘-gencode’, ‘arch=compute_61,code=sm_61’,
‘-gencode’, ‘arch=compute_61,code=compute_61’,
‘-gencode’, ‘arch=compute_70,code=sm_70’,
‘-gencode’, ‘arch=compute_70,code=compute_70’,
‘-gencode’, ‘arch=compute_75, code=compute_75’,
‘-dc’,‘/usr/bin/gcc-7’]

setup(
name=‘correlation’,
ext_modules=[
CUDAExtension(
name=‘alt_cuda_corr’,
sources=[‘correlation.cpp’,
‘correlation_kernel.cu’
], extra_compile_args={‘cxx’: cxx_args, ‘nvcc’: nvcc_args,‘cuda-path’:[‘/usr/local/cuda’]})
],
cmdclass={
‘build_ext’: BuildExtension

})

Thanks

That doesn’t look right.