For contributors to the PyTorch codebase, one of the most commonly encountered C++ classes is TensorIterator
. TensorIterator
offers a standardized way to iterate over elements of a tensor, automatically parallelizing operations, while abstracting device and data type details.
In April 2020, Sameer Deshmukh wrote a blog article discussing PyTorch TensorIterator Internals. Recently, however, the interface has changed significantly. This post describes how to use the current interface as of April 2021. Much of the information from the previous article is directly copied here, but with updated API calls and some extra details.
Read more… (8 min remaining to read)
from Planet Python
via read more
No comments:
Post a Comment