Open dsharlet opened 7 months ago
To consider: you want to inspect these symbolic bounds from python, which may make a C++ template approach questionable.
@derek-gerstmann
To consider: you want to inspect these symbolic bounds from python, which may make a C++ template approach questionable.
It might be helpful to offer a strawman representation that might be useful for the target usage case.
Probably massive overkill, but: a function that returns the .stmt, expressed in some easy-to-interpret bytecode.
Currently, Halide pipelines support bounds queries, but this is a weaker form of understanding bounds than having symbolic expressions that exist internally in Halide.
One way of exporting these for use in Halide runtime code would be to define a function along side the pipeline that only computes bounds, much like a bounds query if defined for integer parameters. But if this function existed as a template, where the type of an index/bound could be customized, that would allow generating symbolic expressions for the bounds, assuming the type supports all the standard Halide expressions (arithmetic,
min
/max
, etc.).