nvcuvid problem from SDK 3.1 to 3.2.

Hi,

I have an nvidia cuvid based decoder to decode H264 streams, I had a kernell witch was working properly to post-process each frame, it is something like this:

int DisplayPicture (............)

{

................

cudaLaunchMyKernel( devPtr, 

		pPreviousDecodedFrame,

		pResultFrame,

		nv12_frame,//nv12_frame

		nvw,nvh,

		pitch,

		mask_X,

		mask_Y);

	CUresult result;

	result = cuMemcpyDtoH(nv12_frame, devPtr, nv12_size);

    cuvidUnmapVideoFrame(session->cuDecoder, devPtr);

..........

If I copy the frame with “result = cuMemcpyDtoH(nv12_frame, devPtr, nv12_size);” it is properly copied and the result is 0 as there si not any CUDA ERROR.

The problem comes when calling cudaLaunchMyKernel function, ir I only try to do the same cuMemcpyDtoH the result is now CUDA_ERROR_INVALID_CONTEXT = 201.

It didn´t happen to me when I had the SDK 3.1 installed.

When I create the context I obtain 3010 version:

unsigned int version;

err = cuCtxGetApiVersion(Session.s_cuContext, &version);

printf("cuCtxGetApiVersion: %d\n", version);

I have read something about diferent calls for diferent versions but I really don´t undestand what is happening here. ¿Can any one help me?

Many thanks.

I am going to try to be more specific in my question, why is my context being created as 3010 version with cuCtxCreate() ??
How can I create a 3020 context? I have installed CUDA Toolkit 3.2, and SDK 3.2, also Developer Drivers for WinVista and Win7 (263.06).

Does any one can help me?

Thank you!

More Info:

When I start my nvcuvid decoder class I get the next results in the cmd:

cudaSetDevice(0): 0 //Ok Device 0 set properly.
cuCtxCreate: 0 //Context created properly.
cuCtxGetApiVersion: 3010 //Context created as 3.1 version

//My CUDA versions are…
cudaRuntimeGetVersion() 3020
cudaDriverGetVersion(version) 3020

Any Ideas on how to geta context to be 3020?

Do you uninstall prev version of sdk? Could it be some path issue. Also check cudart.dll version you loaded.

Yes , I did uninstall it. How can I chek the cudart.dll ?

Cudart is versioned. Maybe you mix in one application different versions of cudart. Maybe your decoder dll uses other cudart version.