cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ngaloppo
Journeyman III

Native kernels broken in 2.3?

Has anyone else noticed native kernel execution to be broken in SDK 2.3? 

I have a workload that runs fine with SDK 2.2, using clEnqueueNativeKernel. However, in 2.3, the instruction pointer register gets all messed up upon returning from the C kernel, causing a hard crash. 

--nico

0 Likes
6 Replies
Illusio
Journeyman III

No, it was broken before 2.3. It used the wrong calling convention. I believe it used cdecl before and stdcall now.

 

0 Likes
Illusio
Journeyman III

No, it was broken before 2.3. It used the wrong calling convention for the callback. I believe it was changed from cdecl to stdcall in 2.3.

0 Likes

Originally posted by: Illusio No, it was broken before 2.3. It used the wrong calling convention for the callback. I believe it was changed from cdecl to stdcall in 2.3.

In practice, what does that mean in terms of writing native kernel code? If I prepend __stdcall to my kernel code, I get (the obvious) compilation error (from cl.h): 

  Error 1 error C2664: 'clEnqueueNativeKernel' : cannot convert parameter 2 from 'void (__stdcall *)(void *)' to 'void (__cdecl *)(void *)'

 

 

0 Likes

Anyone? Is there a sample for native kernels out there? Is it in the AMD test suite? 

0 Likes

ngaloppo,

Can you please send a test case, to reproduce the issue.

Also please specify the system specifications you used when the code was working and when it was not working.

Thanks

0 Likes

Sorry for double post.

0 Likes