Allowing GPU indices beyond 0-7.

This is the first step toward support for more than 8 GPUs.