Saturday, March 25, 2017

AMDGPU-Pro 16.60 on Ubuntu kernel 4.10.5 with ROCM-smi


Although AMDGPU-Pro 16.40 with kernel 4.8 has been working fine for me, I decided to try 16.60 with kernel 4.10.  After my problems with 16.60 on 4.8, I read a few reports claiming it works well with kernel 4.10.

I started with a fresh Ubuntu desktop 16.04.2 install, and then installed 4.10.5 from the Ubuntu ppa.  Although the process is not very complicated, I wrote a small script which downloads the files and installs them.  After rebooting, I downloaded and installed the AMDGPU-Pro 16.60 drivers according to the instructions.  Finally, I installed ROC-smi, a utility which simplifies clock control using the sysfs interface.  To test the install, run "rocm-smi -a" which will show all info for any amdgpu cards installed.

Unfortunately, the new drivers no longer work with my ethminer fork, but sgminer-gm 5.5.5 works as was well as it did with 4.8/16.40.  On GCN3 and newer cards like Tonga and Polaris, the optimal core clock for mining ETH is often between 55% and 56% of the memory clock.  On my Sapphire Rx470 I have the memory overclocked to 2100Mhz, so dpm 6 at 1169Mhz is a perfect fit:
./rocm-smi -d 0 --setsclk 6

Once sgminer was running for a couple minutes, the speed settled at about 29.1Mh/s.  Note that the clock setting is only temporary for the next opencl program to run.  Just run the rocm-smi command each time.

Update 2017-04-08

 4.10.9 was uploaded to the Ubuntu ppa today, so I would recommend it instead of 4.10.5.

8 comments:

  1. have you patched driver to build with kernel 4.10?

    ReplyDelete
    Replies
    1. Strange... Driver 16.40 on 4.8.0-51 just fails to build: https://pastebin.com/c9nYHXdm
      I had to downgrade to 4.4.0. Any thoughts on this?

      Delete
    2. My guess would be you didn't start with a clean 16.04.02 Ubuntu desktop install like I did.
      http://nerdralph.blogspot.ca/2017/03/amdgpu-pro-on-ubuntu.html

      Delete
    3. You're right, I'm using an Ubuntu server (16.04.2 LTS) which is shipped with 4.4.0! The desktop one is shipped with 4.8.0...

      Delete
  2. It looks like rocm-smi can only select clock frequencies already advertised by the card's firmware, so you need a different utility to burn the firmware first? (Is there a way to do that in linux? Or do you use the overdrive option to rocm?) Anyway, my 480/580 cards only give a 2000MHz max for memory clock...

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Ah, I just noticed a forum posts from you mentioning https://github.com/OhGodACompany/OhGodATool to edit the clocks. Perhaps you could do a blog post on how to use it? :)

    ReplyDelete