restore at::Half support for caffe2 SumOp (#41952)

Summary:
PR https://github.com/pytorch/pytorch/issues/40379 added long support but removed at::Half support.  Restore at::Half support.

CC ezyang xw285cornell neha26shah

Pull Request resolved: https://github.com/pytorch/pytorch/pull/41952

Reviewed By: colesbury

Differential Revision: D22720656

Pulled By: xw285cornell

fbshipit-source-id: be83ca7fe51fc43d81bc0685a3b658353d42f8ea
This commit is contained in:
Jeff Daily 2020-07-24 10:46:12 -07:00 committed by Facebook GitHub Bot
parent e9e6cc8c83
commit 2e95b29988

View file

@ -26,7 +26,7 @@ bool WeightedSumOp<CUDAContext>::RunOnDevice() {
template <>
bool SumOp<CUDAContext>::RunOnDevice() {
return DispatchHelper<TensorTypes<float, int32_t, int64_t>>::call(
return DispatchHelper<TensorTypes<float, at::Half, int32_t, int64_t>>::call(
this, Input(0));
}