ROCK-Kernel-Driver icon indicating copy to clipboard operation
ROCK-Kernel-Driver copied to clipboard

Separated driver from sources as a patch?

Open alecuba16 opened this issue 6 years ago • 9 comments

Hello I'm looking for include the driver into my gentoo kernel sources and I would like to automatize it.

Is possible to make the driver implementation with patches and somehow includes?

alecuba16 avatar Mar 07 '18 20:03 alecuba16

This is the patch for kernel 4.16_rc1 based on "fkxamd/drm-next-wip" , remove ".txt"

rocm_kernel.patch.txt

If you want to use in a distribution with autocompile and patching like gentoo, you should follow these instructions. . In my case, I had to emerge the 4.16_rc1 from =sys-kernel/git-sources-4.16_rc1 and place the patch inside the portage patching directory:

/etc/portage/patches/sys-kernel/git-sources-4.16_rc1/rocm_kernel.patch

alecuba16 avatar Mar 10 '18 12:03 alecuba16

Do you have ebuilds for the libraries? I am currently writing ebuilds for the ROC libraries... https://bugs.gentoo.org/650804

justxi avatar Mar 20 '18 20:03 justxi

I also started a discussion about installing ROC stuff on Gentoo ... https://forums.gentoo.org/viewtopic-t-1078562.html

justxi avatar Mar 20 '18 20:03 justxi

Thank you.

clinfo -l work:

Platform #0: AMD Accelerated Parallel Processing
-- Device #0: gfx900

But xmr-stak have not any valid result:

https://github.com/fireice-uk/xmr-stak/tree/dev

HASHRATE REPORT - AMD
| ID |    10s |    60s |    15m |
|  0 | 1105.4 | 1105.0 | 1105.2 |
Totals (AMD):  1105.4 1105.0 1105.2 H/s
-----------------------------------------------------------------
Totals (ALL):   1105.4 1105.0 1105.2 H/s
Highest:  1108.6 H/s
-----------------------------------------------------------------
RESULT REPORT
Difficulty       : 120001
Good results     : 0 / 14 (0.0 %)
Pool-side hashes : 0

Top 10 best results found:
|  0 |                0 |  1 |                0 |
|  2 |                0 |  3 |                0 |
|  4 |                0 |  5 |                0 |
|  6 |                0 |  7 |                0 |
|  8 |                0 |  9 |                0 |

Error details:
| Count | Error text                       | Last seen           |
|    14 | AMD Invalid Result GPU ID 0      | 2018-04-02 01:30:01 |

perestoronin avatar Apr 01 '18 22:04 perestoronin

I will try it on my system.

justxi avatar Apr 03 '18 11:04 justxi

Reason of AMD Invalid Result GPU ID 0 was little od, set it to 0, and Invalid results reduced.

perestoronin avatar Apr 06 '18 05:04 perestoronin

Is there a way to use more than two gfx900 0x687F cards (which requires needs_pci_atomics = true) with Rizen 7 1800x and Linux for OpenCL 1.2 calculations?

In the https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/blob/master/drivers/gpu/drm/amd/amdkfd/kfd_device.c, can find other card gfx900 0x686C, which does not require needs_pci_atomics (set it to false).

What are the necessary rocm stack global patches to disable needs_pci_atomix for gfx900 0x687F and use gfx900 0x687F without needs_pci_atomics for OpenCL 1.2 computing under Linux and Ryzen 7 1800x with more then 2 cards Vega 56 and (without additional switch PCIe 3.0 pci_atomics)?

PS. May be useful: Using RX VEGA is possible on Mesa3D OpenCL (GalliumCompute) https://community.amd.com/thread/222477 https://github.com/matszpk/libclc-vega

perestoronin avatar Apr 08 '18 05:04 perestoronin

686c is a virtual function of a card supporting SRIOV. In that case it's the hypervisor's responsibility to enable atomics.

We're working on a change to remove the dependency on atomics for Vega10. It can still use atomics when available but won't fail any more when they are not.

fxkamd avatar Apr 09 '18 18:04 fxkamd

Thank you. I find to how to remove "reject" on https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/commit/d78bd8e07af91cd6869eb238a0bd91af6e56f0da for Vega 10. But OpenCL rocm and clinfo still don't work in case then Vega10 insert to other slot than PCI 3.0 atomic slots. What other patches need to avoid this and succesfull work OpenCL rocm in any PCIe slot, not only PCI 3.0 atomic can ?

perestoronin avatar Apr 20 '18 05:04 perestoronin