Please see the newer 'gpumgr' instead -- amdpwrman is a BASH shell script for managing AMD GPU's power limits and fan speeds under Linux via the sysfs interface of the amdgpu driver.
The hwmon variable doesn't always get set, which results in errors. I fixed this in my cloned repository by setting hwmon wherever the gpu variable is set. There may be a more elegant solution to this problem, but it works for me. Otherwise, this seems like a good script so far.