chapel
chapel copied to clipboard
`--report-gpu` does not work with promotions or loop expressions
I am finding that --report-gpu
does not work with promotions or loop expressions. For example, take the following code
on here.gpus[0] {
var x, y: [1..10] int;
@assertOnGpu()
var z1 = x != y;
@assertOnGpu()
var z2 = foreach i in x.domain do x(i) != y(i);
var z3: [x.domain] bool;
@assertOnGpu()
foreach i in x.domain do z3(i) = x(i) != y(i);
@assertOnGpu()
var z4 = + reduce (x != y);
writeln(z1);
writeln(z2);
writeln(z3);
writeln(z4);
}
This compiles and runs fine, and running with startVerboseGpu()
shows that kernel launches occur for all 4 z
. But if I compile with --report-gpu
, it only says there are 2 GPU eligible loops, for z3 and z4.
$ chpl foo2.chpl --report-gpu
GPU INELIGIBLE LOOPS:
---------------------
GPU ELIGIBLE LOOPS:
-------------------
foo2.chpl:13
foo2.chpl:16