TensorIterator (Python)
torch._tensor_iterator is a thin Python surface over ATen’s
at::TensorIterator build pipeline. It is a developer tool: it lets you
inspect the result of a TensorIterator build (shape after coalesce/reorder,
strides, dtype/device inference, broadcast result) without leaving Python.
There is no for_each here – this surface is build-only. Use it to debug
shape/dtype inference, validate custom-op contracts, or pattern-match the
post-build geometry from a dispatch decision (see
torch._native/ops/scatter_add/cutedsl_impl.py for an example).
C++ fluent → Python kwargs
The C++ builder is a fluent at::TensorIteratorConfig whose setters return
: