Set active device in cuda example