nvidia-smi -pl `nvidia-smi --query-gpu=power.max_limit --format=csv,noheader,nounits`
This runs nvidia-smi to get the maximum power level for the GPU as a number alone, then runs it again and sets the power level to that number. This will work as long as you have only one nvidia GPU in your system. Otherwise take a look at the -i option information in nvidia-smi --help.