Fred Burton <fredlburton(a)gmail.com> writes:
> Hi,
>
> Thanks for clarifying the error message!
>
> In my case, I'm not actually sure the domain should be empty though.
>
> Here's my whole kernel:
>
>
> for ri
> for ac
> <float32> trace_inv[ac] = 1.0/trace[ri, ac]
> end
>
> for bi
>
> for cc
> <float32> t1 = (bbmin[bi, cc] - rs[ri, cc])*trace_inv[cc]
> <float32> t2 = (bbmax[bi, cc] - rs[ri, cc])*trace_inv[cc]
>
> <float32> min_ta[cc] = if(t1<t2,t1,t2)
> <float32> max_ta[cc] = if(t1<t2,t2,t1)
> end
>
> <float32> tmin = max(cca, min_ta[cca])
> <float32> tmax = min(ccb, max_ta[ccb])
>
> <float32> tm0 = if(tmin>0.0, tmin, 0)
> <int32> hit[bi] = if(tmax > tm0, 1, 0)
> <int32> start = starts[ri] - counts[ri]
> <int32> outindex = start + sum(bi_part, hit[bi_part])
> if hit[bi] == 1
> out_array[outindex] = ri * nbboxes + bi
> end
> end
> end
>
>
> and domain of:
>
> ["{ [ri, cc, ac, bi, cca, ccb, bi_part]: 0<=ri<nrays and
> 0<=bi<nbboxes and 0<=cc<3 and 0<=ac<3 and 0<=cca<3 and 0<=ccb<3 and
> 0<=bi_part<bi}"],
>
>
> with splitting on iname "ri" like this
> trace_pack_bbox_hits = lp.split_iname(trace_pack_bbox_hits, "ri", 64,
> outer_tag="g.0", inner_tag="l.0", slabs=(0, 1) )
>
>
> I was getting that empty domain error with nbboxes = 1 in a test.
No--that's performing as designed. With nboxes = 1, you have:
0<=bi_part<bi -- so in particular 0 < bi, which is identical to bi >= 1
and rules out bi == 0
0<=bi<nbboxes -- which, together with the previous constraint, implies
nboxes > bi >= 1, i.e. nboxes >= 2, so once you assume nboxes == 1,
there's nothing left.
You may want to stick the "0<=bi_part<bi" bit into a
subdomain--i.e. pass
[
"{ [ri, cc, ac, bi, cca, ccb]: 0<=ri<nrays and
0<=bi<nbboxes and 0<=cc<3 and 0<=ac<3 and 0<=cca<3 and 0<=ccb<3 }",
"{[bi_part]: 0<=bi_part<bi}"
]
for domains. That should be closer to what you want. In particular, the
emptiness of the bi_part domain in this case will not empty out your
outer iteration domain.
HTH,
Andreas

Fred Burton <fredlburton(a)gmail.com> writes:
> Hi,
>
> I encountered an error when trying to execute a kernel which has been split
> with split_iname and has had some parameters fixed with fix_parameters
>
> I get:
>
> loopy.diagnostic.StaticValueFindingError: a static maximum was not found
> for PwAff '{ }'
>
> which doesn't really tell me which variable it is having trouble with, now
> what the problem is or multiple (?) possible maximums / solutions.
>
>
> Here's a pastebin link with the .. partially slimmed down example:
>
> https://pastebin.com/wjt792Uw
>
>
> * my original code was longer and actually did something -- (in that case
> it did complain about a name but the domain '{ }' was still empty)
>
> Please let me know what I should look for if the error message is like
> this, or if you'd like I can paste the longer code example with the
> specific error that I ran into.. (or if this error is a bug?)
If you print 'krn' right before the execution line, you'll see that the
loop domain has become empty (as a result of the fix_parameters):
{ [ac, bi, bi_part, ri_outer, ri_inner] : 1 = 0 }
Essentially that is what loopy is complaining about. I've done a bit of
work to improve the error message:
https://gitlab.tiker.net/inducer/loopy/merge_requests/104
HTH,
Andreas

Hi,
I encountered an error when trying to execute a kernel which has been split
with split_iname and has had some parameters fixed with fix_parameters
I get:
loopy.diagnostic.StaticValueFindingError: a static maximum was not found
for PwAff '{ }'
which doesn't really tell me which variable it is having trouble with, now
what the problem is or multiple (?) possible maximums / solutions.
Here's a pastebin link with the .. partially slimmed down example:
https://pastebin.com/wjt792Uw
* my original code was longer and actually did something -- (in that case
it did complain about a name but the domain '{ }' was still empty)
Please let me know what I should look for if the error message is like
this, or if you'd like I can paste the longer code example with the
specific error that I ran into.. (or if this error is a bug?)
Thanks,