Implemented template of using multi GPU.