fix gpu/cpu bug, do not cast when setting similar_