Copying from host to constant memory not working on Tesla P100

The function cudaMemcpyToSymbol failed on a Tesla P100 GPU. The code ran successfully on other GPUs. I am wondering if constant memory is not available on Tesla GPUs. Thanks.

It’s available on all CUDA GPUs, GeForce, Quadro, Tesla.

Then could you provide a potential reason for such an issue? To validate if cudaMemcpy(To/From)Symbol works, we did a quick test using a simplest program: declare constant memory, then copy from host to constant memory, then copy back from constant to host. The value copied back was not the one copied to constant memory. So basically, the simplest test failed. The failure was not seen before on other GPU types.

  1. a bug in your code.
  2. broken CUDA install on the machine that is not working

Have you implemented proper CUDA error checking?

I won’t go down the abstract path any further. The “simplest” program you describe should only require about 20 lines of code. Provide that entire program here, along with your compilation command, the operating system you are running on, and the CUDA version you are using.