Power Modeling and Optimization for GPGPUs