halide / Halide

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

Autoscheduler UX: Use natural_vector_size() in generated schedule? #6599

Open ashishUthama opened 2 years ago

ashishUthama commented 2 years ago

Would it make sense to use natural_vector_size() instead of a hardcoded number in the generated code? It would serve two purposes:

  1. Convey a tangible reason for a schedule to a new user (rather than a magic number)
  2. Make it slightly easier to compare schedules when tweaking it for multiple targets. i.e say I was tuning for AVX and another for AVX2, using natural_vector_size() will potentially reduce the difference between the two and in some cases eliminate the need to have two different schedules in the generator.
steven-johnson commented 2 years ago

See also https://github.com/halide/Halide/issues/5070