Use tensor as the bottom implementation and support plain scalar. Note: DO NOT support the backward for ReduceSumAll function.