5

i'm making my first steps with opencl and now have a problem. i'm using the NVIDIA OpenCL lib with a GT540m graphics card.

Now it seems that the kernel gets cached after compiling and is not recompiled when i do some changes to the kernel. To test i'm writing some values to the output buffer but when i change these values in the kernel the output remains the same.

How can i prevent this behaviour?

Thanks a lot. greetings robin

2

1 Answer 1

6
void enable_cuda_build_cache(bool enable)
{
#ifdef _MSC_VER
    if (enable)
        _putenv("CUDA_CACHE_DISABLE=0");
    else
        _putenv("CUDA_CACHE_DISABLE=1");
#else // GCC
    if (enable)
        putenv("CUDA_CACHE_DISABLE=0");
    else
        putenv("CUDA_CACHE_DISABLE=1");
#endif
}

To disable cache call: enable_cuda_build_cache(false);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.