Results 1 to 2 of 2

Thread: 20% data lost on a R9

  1. #1

    20% data lost on a R9

    I lose 20% of data results:

    I made following test at GPU:

    Code :
            int i=get_global_id(0) % xmax;
    	int l=get_local_id(0);
    	//if ((mv>DELTA_MOVE)||(mv<-DELTA_MOVE))
    	{
    		if (i<xmed)
    		{
    			movy1[l]+=mv;
    			count1[l]++;
    		}
    		else
    		{
    			movy2[l]+=mv;
    			count2[l]++;
    		}
    	}

    Then after retrieve all data I add all count1[] and count2[+ I lost 20% of the data

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    237
    Race condition. Multiple work items are incrementing the same memory locations at the same time. You need to use atomics to solve (or change the algorithm to remove the simultaneous access).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean