Runtime handling of device specific setting
Runtime handling of device specific setting
Enable runtime discovery of platform specific settings for example max allowable shared memory, that are used in device Executor. Thus avoiding runtime error of miss specified device dependent values.
For example for different compute capabilities of nvidia gpu the max allowable shared memory changes and this lead the following error if the max shared memory value is hard-coded:
CUDA Runtime Error at: <...>/cudaExecutor.cu:308
invalid argument cudaFuncSetAttribute ( Foam::cuda::reductionLambdaSumKernel<resultT, F>, cudaFuncAttributeMaxDynamicSharedMemorySize, maxbytes )
--> FOAM FATAL ERROR: (openfoam-2412)
Edited by Giuseppe Giaquinto