1// Target: blockDim = 256, at least 8 resident blocks per SM2__global__void__launch_bounds__(256,8)3myKernel(constfloat*__restrict__in,float*out,intn){4__shared__floattile[2048];// 8 KB5...6}78// Confirm real register count at compile time:9// nvcc -O3 -arch=sm_80 -Xptxas -v -c kernel.cu10// Let CUDA recommend blockDim at runtime:11// cudaOccupancyMaxPotentialBlockSize(&minGrid, &blockSize, myKernel, 0, 0);