assert weights being 1-d tensor in bincount (#85881)
Summary:
as title,
fix https://github.com/pytorch/pytorch/issues/85777
Test Plan: unittest added
Differential Revision: D39913476
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85881
Approved by: https://github.com/mruberry, https://github.com/ngimel