Use IndexError instead of RuntimeError in ATen CPU kernels
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17049
Reviewed By: ezyang
Differential Revision: D14064700
Pulled By: fmassa
fbshipit-source-id: 3575db103bba5a7d82f574cbb082beca419151ec