Why it's not valid?

I use 1080Ti, Cuda10, VS2015, and my code:

cudaSharedMemConfig pConfig;
cudaDeviceGetSharedMemConfig(&pConfig);
printf(“with Bank Mode:%s \n”, pConfig == 1 ? “4-Byte” : “8-Byte”);

cudaDeviceSetSharedMemConfig(cudaSharedMemBankSizeEightByte);
cudaDeviceGetSharedMemConfig(&pConfig);
printf(“with Bank Mode:%s \n”, pConfig == 1 ? “4-Byte” : “8-Byte”);

Result:
with Bank Mode:4-Byte
with Bank Mode:4-Byte

why I get the 4-Byte mode yet after I set cudaSharedMemBankSizeEightByte?

Eight byte bank mode is a feature only supported by Kepler generation (sm_3x) GPUs.

Hi, Thank you for reply.

I think Pascal GPU is more advance than Kepler product, don’t it support this feature?

Read section 1.4.5.2 here: https://docs.nvidia.com/cuda/pascal-tuning-guide/index.html#shared-memory
It has the information you want.

In my own code I have the 8-bytes selected for specific functions that use double precision, which has no effect in Maxwell/Pascal but I also expect the app to be run on Kepler.

Okay,I understand it.
ThXXX:-)