Use c10::variant-based enums for Reduction
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/27942
Test Plan: Imported from OSS
Differential Revision: D18202857
Pulled By: yf225
fbshipit-source-id: 0303ce2508e3b7665c6a91ae270a7d0ef0e45900