[SPIRV] Pre-compiled tests fixed
@@ -145,11 +145,11 @@ public class PrebuiltTest extends TornadoTestBase {
String tornadoSDK = System.getenv("TORNADO_SDK");
String filePath = tornadoSDK + "/examples/generated/reduce03.spv";
- final int size = 1024;
+ final int size = 512;
final int localSize = 256;
float[] input = new float[size];
float[] reduce = new float[size / localSize];
- IntStream.range(0, input.length).sequential().forEach(i -> input[i] = 2);
+ IntStream.range(0, input.length).sequential().forEach(i -> input[i] = 1);
WorkerGrid worker = new WorkerGrid1D(size);
GridScheduler gridScheduler = new GridScheduler("s0.t0", worker);
@@ -168,8 +168,6 @@ public class PrebuiltTest extends TornadoTestBase {
.execute(gridScheduler);
// @formatter:on
- System.out.println(Arrays.toString(reduce));
-
// Final SUM
float finalSum = 0;
for (float v : reduce) {
@@ -190,30 +188,29 @@ public class PrebuiltTest extends TornadoTestBase {
String filePath = tornadoSDK + "/examples/generated/reduce04.spv";
final int size = 32;
- final int localSize = 16;
+ final int localSize = 32;
int[] input = new int[size];
int[] reduce = new int[size / localSize];
IntStream.range(0, input.length).sequential().forEach(i -> input[i] = 2);
WorkerGrid worker = new WorkerGrid1D(size);
- GridScheduler gridScheduler = new GridScheduler("s0.t0", worker);
+ GridScheduler gridScheduler = new GridScheduler("a.b", worker);
KernelContext context = new KernelContext();
// @formatter:off
- new TaskSchedule("s0")
- .prebuiltTask("t0",
+ new TaskSchedule("a")
+ .prebuiltTask("b",
"intReductionAddGlobalMemory",
filePath,
new Object[]{context, input, reduce},
- new Access[]{Access.READ, Access.READ_WRITE, Access.WRITE},
+ new Access[]{Access.READ, Access.READ, Access.WRITE},
defaultDevice,
new int[]{size})
- .streamOut(reduce, input)
+ .streamOut(reduce)
.execute(gridScheduler);
// @formatter:on
System.out.println(Arrays.toString(reduce));
- System.out.println(Arrays.toString(input));
// Final SUM
float finalSum = 0;
