PyTorch Developer Podcast

TensorIterator


Listen Later

You walk into the whiteboard room to do a technical interview. The interviewer looks you straight in the eye and says, "OK, can you show me how to add the elements of two lists together?" Confused, you write down a simple for loop that iterates through each element and adds them together. Your interviewer rubs his hands together evilly and cackles, "OK, let's make it more complicated."

What does TensorIterator do? Why the heck is TensorIterator so complicated? What's going on with broadcasting? Type promotion? Overlap checks? Layout? Dimension coalescing? Parallelization? Vectorization?

Further reading.

  • PyTorch TensorIterator internals https://labs.quansight.org/blog/2020/04/pytorch-tensoriterator-internals/
  • Why is TensorIterator so slow https://dev-discuss.pytorch.org/t/comparing-the-performance-of-0-4-1-and-master/136
  • Broadcasting https://pytorch.org/docs/stable/notes/broadcasting.html and type promotion https://pytorch.org/docs/stable/tensor_attributes.html#type-promotion-doc
...more
View all episodesView all episodes
Download on the App Store

PyTorch Developer PodcastBy Edward Yang, Team PyTorch

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

47 ratings


More shows like PyTorch Developer Podcast

View all
Talk Python To Me by Michael Kennedy

Talk Python To Me

592 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

213 Listeners

The Product Podcast by Product School

The Product Podcast

167 Listeners

NerdWallet's Smart Money Podcast by NerdWallet Personal Finance

NerdWallet's Smart Money Podcast

750 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

7,874 Listeners

Naval by Naval

Naval

2,096 Listeners