RoshanGerard / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

JTP execution not executing passes #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make a simple kernel
2. Execute with execute(n, 2)

What is the expected output? What do you see instead?
Kernel should run two passes, it only runs one.

What version of the product are you using? On what operating system?
Latest, r258, on OSX

Please provide any additional information below.
I think the new Range calculations have somehow made the "passes" go away.
I can see that the value is passed along, but there is no loop using the value.
Searching for "passid" inside KernelRunner.java shows that it is only used with 
SEQ mode (line 682).

Original issue reported on code.google.com by kenneth@hexad.dk on 15 Feb 2012 at 12:30

GoogleCodeExporter commented 9 years ago
Well that's embarrasing. Thanks for finding this.  Clearly I need another test 
case ;)

I will fix this today and put out another binary. 

Original comment by frost.g...@gmail.com on 15 Feb 2012 at 3:34

GoogleCodeExporter commented 9 years ago
Ken I just checked in the code for this in the main branch. 

I will build a binary now. 

Here is the test code I used. 

import com.amd.aparapi.Kernel;
import com.amd.aparapi.Range;

public class TestPasses{
   public static void main(String[] args) {
       final int data[] = new int[64];
       Range range = Range.create(data.length);
       Kernel kernel = new Kernel(){

         @Override public void run() {
            data[getGlobalId(0)]+=getPassId();

         }

       };
       kernel.execute(range, 4);
       for (int i:data){
          System.out.print(i+",");
       }
       System.out.println();

   }
}

Original comment by frost.g...@gmail.com on 15 Feb 2012 at 4:57

GoogleCodeExporter commented 9 years ago
Yes, that seems to fix it for me, thanks.

Original comment by kenneth@hexad.dk on 16 Feb 2012 at 12:32