Open jabraham17 opened 2 months ago
Ah, promotion is unfortunately different and fails because https://github.com/chapel-lang/chapel/issues/25533. That doesn't explain the loop expression case, though.
I don't know what I was thinking, the expression version should also zipper as it needs to iterate over the array that is the LHS. This is almost a duplicate of #25533
Using a multidimensional array in a loop expression prevents the compiler from being able to create kernels. This should work and result in a kernel launch.
For example, the following loop expression cannot be gpuized
Compiling with
@assertOnGpu
fails to compile, as the compiler determines that the loop expression is not gpuizable. I also confirmed that there is no kernel launch withstart/stopVerboseGpu
. ChangingD
to be{1..0}
does work and does result in a kernel launch. Also, changing the loop expression into a loop statement also results in a kernel launch, regardless of the domain.The same is true with promotion, which currently fails to be gpuized with multidimensional arrays. The following fails to compile and turn into a kernel, but changing the domain to be
{1..10}
does.In the loop expression case, the compiler complains that
advance
is not gpu eligible with no further information. In the promotion case, the compiler gives a little more information: