-
Notifications
You must be signed in to change notification settings - Fork 32
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
invalid device symbol error on CUDA 5.0 #1
Comments
Hey George, I haven't tested with CUDA 5 yet so it appears that API changes are causing problems. If you've gotten this working a pull request would be great, I'm sure others would find it useful. I'll take a closer look as soon as I can. |
My research group is working with the Virginian database and we have updated the applicable calls and directives to compile using CUDA 5. There are other changes in our fork besides the 5.0 update, but I believe it may be of use. https://github.com/sjolsen/virginian |
Thats awesome, let me know if you have questions about the code, some of it is more than a little messy. I would love to merge some of those changes in if you think they would be useful. |
I'm also getting this error when trying to build with CUDA 5.5. I tried updating these calls to match the new format, but the tests still bomb with an invalid device symbol error. Since I'm still very new to CUDA, I'm guessing that I'm still missing something obvious. @brianromoser, would you be willing to share some of your fixes? The url provided doesn't work anymore. Thanks, |
Never mind. My issue actually turned out to be that I have two graphics cards, and there is hard-coded device selection. After changing this to auto-select the correct card, I was able to compile and run using CUDA 5.5 without any errors or test failures. |
Hello @georgezhlw , |
Compile with CUDA 5.0, when run the example program, got error:
virginian-master/example]$ ./test
CUDA serial const memcpy 1 error: invalid device symbol :: vm/vm_gpu.cu line 123
Looks like cudaMemcpyToSymbol((char_)&vm, (char_)vm_,
sizeof(virg_vm), 0, cudaMemcpyHostToDevice);
need to be changed to
cudaMemcpyToSymbol(vm, (char*)vm_,
sizeof(virg_vm), 0, cudaMemcpyHostToDevice);
And vm need to be a pointer.
thanks,
Liwen (George) Zhang
The text was updated successfully, but these errors were encountered: