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.

18 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
    Replies
    1. I'm planning on doing something even better: a tool that modifies the clocks, DPM states, and even the timing straps, all without having to re-flash the BIOS.

      Delete
    2. Amazing, I was already looking at the pp_table to do such a tool :) Will wait for yours then!

      Delete
    3. Ralph, you're my new hero! :)
      Do you know of version constraints on the kernel or driver to use the tool? I'm setting up a new system soon and would want to make sure it's compatible. (e.g. what configuration are you developing it with?)

      Delete
    4. I'm still using AMDGPU-Pro 16.60 and kernel 4.10. I haven't decided yet if I'll release a standalone tool, or have it as part of a new version of ethminer-nr. And you might have to wait a while depending on how busy I am over the summer.

      Delete
    5. Mmmmmm... There's no /sys/class/drm/card0/device/pp_table (nor using card1). I'm on kernel 4.10.7 with drivers 17.10 - are the pp_table only available with the open source driver?

      Delete
    6. I haven't tried 17.10 yet, but it's definitely there with 16.40 and 16.60. I have noticed that the card numbering isn't consistent; card0 sometimes shows up as card1 (and vice-versa) after a reboot.

      Delete
    7. My bad, was looking at the integrated GPU. Sorry for the noise!

      Delete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. Just wrote a really useful script to choose/download/install your kernel:

    https://gist.github.com/renaudcerrato/d1d3dc2e7f49d86a808ff020a7b0eb88

    ReplyDelete