cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

rahulgarg
Adept II

Beware of calMemCopy

Just a suggestion to application coders

I was tracking down a bug in an application and it appears that calMemCopy can cause incorrect transfers under some conditions.
Its best to use "fresh" CALmem when doing the transfers and release the CALmem used in the memcopy before accessing the data. If you want to use calMemCopy, use the Copy function provided in one of the samples. That always correctly.
0 Likes
9 Replies
udeepta
Staff

Rahul, if you get the chance, feel free to send us a sample that can be used to reproduce the condition. Our CAL engineers would appreciate it.

0 Likes
rahulgarg
Adept II

Sent a sample as PM. Can also post here if required.
0 Likes

Got it, thank you.

0 Likes

Rahul, It will be great for others if you can post that code here.

 

0 Likes

Rahul, can you please send us the specs of your machine when you see the error (more details the better):

CPU, cache size, clock rates

GPU, brand, engine and memory clock rates

PCIe express lanes, Gen1 or 2

How often do you see the error?

Please send the info to ATTN: Newton, Udeepta at streamdeveloper@amd.com

0 Likes
rahulgarg
Adept II

0 Likes
rahulgarg
Adept II

In the above code, the "sum" should be printed out twice and if the two values printed are different, then there is a bug.
0 Likes

There is a bug in the parameters for calCtxIsEventDone() in the copy function. The context and event handles are switched. The call returns an error code that you may check. I think this should solve the issue.

0 Likes
rahulgarg
Adept II

Oh .. damn.
Fixed .. works .. thanks !!
0 Likes