CUDAfy Module Performance

Each time I create and run my CUDAfy code, it takes considerable time to load the module and translate it. Is there a way to reduce the time taken to translate and download?

+4
source share
1 answer

It is not always advisable to always call Cudafy if the GPU code has not been changed. You can cache Cudafy modules using serialization.

CudafyModule km = CudafyModule.TryDeserialize();
if (km == null || !km.TryVerifyChecksums())
{
    km = CudafyTranslator.Cudafy();
    km.Serialize();
}

TryDeserialize *.cdfy , . , null . , , - .NET-, . TryVerifyChecksums. false, , , cudafy .

+6

Source: https://habr.com/ru/post/1623905/


All Articles