finish cpu reduction higherdim, need check, also need gpu ver