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

error LNK2001 undefined reference to `__cudaRegisterLinkedBinary #80

Open
aisuta opened this issue Jul 29, 2022 · 0 comments
Open

error LNK2001 undefined reference to `__cudaRegisterLinkedBinary #80

aisuta opened this issue Jul 29, 2022 · 0 comments

Comments

@aisuta
Copy link

aisuta commented Jul 29, 2022

mycode
-setup.py
-a_cuda_kernel.cu
-a_cuda.cpp

I need to open rdc mode,so
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension

setup(
name='a_cuda',
ext_modules=[
CUDAExtension('a_cuda', [
'a_cuda.cpp',
'a_cuda_kernel.cu',
],extra_compile_args={'nvcc':['-rdc','true']}),
],
cmdclass={
'build_ext': BuildExtension
})

or
setup(
name='att_cuda',
ext_modules=[
CUDAExtension('a_cuda', [
'a_cuda.cpp',
'a_cuda_kernel.cu',
],dlink=True,extra_compile_args={'nvcc':['-rdc','true']}),
],
cmdclass={
'build_ext': BuildExtension
})

error LNK2001 undefined reference to `__cudaRegisterLinkedBinary occured
it seems to break when program execute
link.exe
thank you verymuch

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

1 participant