WIP: Fix c execution's handling of GlobalArgs with empty shapes
ExecutableCTarget
currently doesn't play nicely with GlobalArgs
with shape = ()
. E.g.,
import loopy as lp
knl = lp.make_kernel(
"{[i]: 0<=i<1}",
"f = 1",
[lp.GlobalArg('f', shape=()), '...'],
target=lp.ExecutableCTarget()
)
knl(f=1.)
results in an error here which this first commit resolves (checks that arg.unvec_strides
is non-empty before indexing it). But now I get an assertion error
assert , 'Strides of loopy created array f, do not match expected.'
in the generated code, which I don't know how to handle.
Edited by Zach Weiner