What is vectorization? How do you use it in PyTorch? What are some of the traps and pitfalls of writing vectorized code in PyTorch?

Further reading:

  • native/cpu README https://github.com/.../aten/src/ATen/native/cpu/README.md
  • Vec256 classes https://github.com/.../tree/master/aten/src/ATen/cpu/vec256
  • AVX512 support tracking issue https://github.com/pytorch/pytorch/issues/56187