ROCm / ROCK-Kernel-Driver

AMDGPU Driver with KFD used by the ROCm project. Also contains the current Linux Kernel that matches this base driver
Other
331 stars 101 forks source link

Separated driver from sources as a patch? #46

Closed alecuba16 closed 3 months ago

alecuba16 commented 6 years ago

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 commented 6 years ago

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

justxi commented 6 years ago

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

justxi commented 6 years ago

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

perestoronin commented 6 years ago

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 |
justxi commented 6 years ago

I will try it on my system.

perestoronin commented 6 years ago

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

perestoronin commented 6 years ago

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

fxkamd commented 6 years ago

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.

perestoronin commented 6 years ago

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 ?

ppanchad-amd commented 3 months ago

@alecuba16 Closing this ticket since there has been no activity on this ticket in a while. If you still see the issue with the latest ROCm 6.2, please create a new ticket. Thanks!