WIP Jiterator reduction
This PR enables jit-compiled reductions and moves `prod` to be jit-compiled.
Currently, only reductions that can use `func_wrapper` for automatic implementation of `reduce/project/translate_idx` opes are supported, there are a few TODOs for support of more complex reductions such as norms and max, that typically require full-fledged ReduceOps functor. Similarly, only reductions with a single input are supported.
Number of inputs is hardcoded to 1, which is true for our current reductions, but can be relaxed in the future.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74446
Approved by: https://github.com/mruberry
Author
Natalia Gimelshein