Remove scalar_check from topk, move it to the THC implementation.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/30852
Test Plan: Imported from OSS
Differential Revision: D18842662
Pulled By: gchanan
fbshipit-source-id: b5e8a4367fce9441be2ddbd026495f1911038221