For me "easily" mean I caused a kernel panic and/or a pci-error on every attempt to modify your code...

Anyway running an unmodified version of your tool I get this output:
./amdmemtweak -i 0 --current
#
NOTHING :-)
I think the problem is I'm using an OSS Driver from debian and not the amd one....
(
https://wiki.debian.org/it/AtiHowTo)
My card (WX-5100) is peculiar and I could not achive a decent install on debian 9 of the amd driver..
Anyway, still reading your code, a brilliant work! (even if I can understand just a 10% of it)
Bye
I added support for your GPU

You can check last commits how it's done, it's fairly easy.
So next time, when you encounter this "issue" you know what to do

I also pushed a new release with a bunch of new HBM2 timings and a bunch of fixes

Enjoy!