Recently I have had to compile CUDA code that had been written for an anterior version of CUDA 5.0 and encountered errors with an old library. After a quick google search on the Nvidia website, and some forums, I discovered that the library I was trying to use had been replaced in the latest versions of CUDA. This is a quick fix if you need to compile code that include the following deprecated library:
1 |
#include<cutil_inline.h> |
Simply replace this library with the following :
1 |
#include <helper_cuda.h> |
In the old code the following function was used :
1 |
cutilSafeCall(x); |
To avoid modifying the multiple files I simply added this line :
1 |
#define cutilSafeCall(x) checkCudaErrors(x) |
Also I replaced all occurrences of :
1 |
cutilDeviceSynchronize(); |
by :
1 |
cudaDeviceSynchronize(); |
and added this line as well :
1 |
#define cutilCheckMsg(x) getLastCudaError(x) |
I was now able to compile the old code, and run it with CUDA 5.5. I hope this helps.
Post a Comment