halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.83k stars 1.07k forks source link

auto-schedule estimate() methods may warrant cleanup #2451

Open steven-johnson opened 6 years ago

steven-johnson commented 6 years ago

Concerns I have from some experimentation.

(1) The methods for providing estimates on Param and ImageParam are "set_" prefixed, but the methods for Func are not. (2) For Input<Buffer<>> you must use .set_bounds_estimate() but for Output<Buffer<>> you must use .estimate(); if you understand the implementation underneath, this makes sense, but is weird and counterintuitive IMHO (3) For Func, it would be convenient to have an API for providing an estimate for nth-dimension, for (e.g.) a defined Func that is passed to you where you know the dimension count but not necessarily the Var names. (You can approximation this with Func::args()[] but it's ugly.)

Strawman proposal:

steven-johnson commented 6 years ago

Tagging @psuriana and @abadams for feedback