CUBLAS: MapSMtoCores is undefined for SM 5.2 (GTX970)

I get the following warning while running the CUBLAS sample batchCUBLAS.

MapSMtoCores for SM 5.2 is undefined.  Default to use 128 Cores/SM
GPU Device 0: "GeForce GTX 970" with compute capability 5.2

How can I resolve this problem? Can I set this in my code? If yes, what should be the proper value?

Are you using the CUDA 6.5 update that applies to cc 5.2 devices?

If you’re not sure, what is the result of running

nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2014 NVIDIA Corporation
Built on Wed_Aug_27_10:28:57_CDT_2014
Cuda compilation tools, release 6.5, V6.5.16

The version of nvcc that I have running here support cc 5.2 and prints the same version information.

The function _ConvertSMVer2Cores() in common/inc/helper_cuda.h in the CUDA Samples seems to be the one that prints the particular message you are seeing about MapSMtoCores being undefined. The version of the file I have here does include support for cc 5.2.

My best guess is that some or all of your CUDA Samples files are from an older version of CUDA and not the most recent one. A reasonable working hypothesis would be that that when you installed the latest CUDA software you installed the toolkit only, but not the samples (my memory is a bit hazy but as I recall the installation of the samples is optional?).

For reference, here is what you should be seeing at common/inc/cuda_helper.h line 938:

sSMtoCores nGpuArchCoresPerSM[] =
    {
        { 0x10,  8 }, // Tesla Generation (SM 1.0) G80 class
        { 0x11,  8 }, // Tesla Generation (SM 1.1) G8x class
        { 0x12,  8 }, // Tesla Generation (SM 1.2) G9x class
        { 0x13,  8 }, // Tesla Generation (SM 1.3) GT200 class
        { 0x20, 32 }, // Fermi Generation (SM 2.0) GF100 class
        { 0x21, 48 }, // Fermi Generation (SM 2.1) GF10x class
        { 0x30, 192}, // Kepler Generation (SM 3.0) GK10x class
        { 0x32, 192}, // Kepler Generation (SM 3.2) GK10x class
        { 0x35, 192}, // Kepler Generation (SM 3.5) GK11x class
        { 0x37, 192}, // Kepler Generation (SM 3.7) GK21x class
        { 0x50, 128}, // Maxwell Generation (SM 5.0) GM10x class
        { 0x52, 128}, // Maxwell Generation (SM 5.2) GM20x class
        {   -1, -1 }
    };

Please make sure you are downloading the CUDA 6.5 toolkit from this page: https://developer.nvidia.com/cuda-downloads-geforce-gtx9xx.

That is an updated CUDA 6.5 toolkit that supports the GTX 9xx cards.