Implement getNumGPUs helper