fix performance issue of gpu reduction