AMP reduce Optimization + minor device_vector fixes