Skip to content

Accesses inside indexing expressions should be in compute bounds #6131

@alexreinking

Description

@alexreinking

This is a bit of a loose thought, but I'm wondering how bounds inference handles cases like this:

h(x) = 10;
g(x) = sin(x); // whatever
f(x) = g(h(x));

h.compute_root();
g.compute_root();
f.split(x, xo, xi, 8, TailStrategy::RoundUp);

f.realize(10);

It seems to me there might be a hazard with h(x) being uninitialized between x = 10-15, unless accesses inside index expressions are required to be in the compute bounds (so the mem bounds of f become the compute bounds of h) - is that how BI actually works?

I couldn't find a case (at least during POPL paper crunch) to actually test this because the compiler is a bit too smart about inlining.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions