开发者

cuda invalid resource handle

What does this error mean? I can't seem to find ANY information on it. It occurs on a cudaEventRecord.

in the project heade开发者_开发问答r file:

cudaEvent_t cudaEventStart;

in a .c file:

cudaEventCreate(&cudaEventStart);
printf("create event: %d\n", (int) cudaEventStart);

in my one .cu file:

printf("record event: %d\n", (int) cudaEventStart);
cudaEventRecord(cudaEventStart);

the relevant output shows what the problem with the call is. cudaEventStart isn't a valid event resource in my cu file for some reason:

create event: 44199920
record event: 0

Details

  • CUDA 3.2
  • GTX 480
  • 64-bit Win7

I'm in the process of porting my code from linux to windows. It runs fine on the same card in linux, and there have been only a few changes. I defined roundf and added the following:

typedef size_t off_t;
#define strtof(str,n) (float)strtod(str,n)
#include <float.h>
#define isnan(n) _isnan(n)
#define strcasecmp _stricmp
#include <io.h>
#define read _read

It isn't clear to me why any of these things should affect cuda resources. Perhaps I'm building the project incorrectly somehow...?


An invalid resource handle usually means trying to use something (pointer, symbol, texture, kernel) in a context where it was not created. A more specific answer will require a more specific question, particularly which API you are using and how/if you are using host threads anywhere in the code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜