[gpu] move GetIndexBounds to common