-
Notifications
You must be signed in to change notification settings - Fork 5.2k
amdgpu fixes for rpi5 #6947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rpi-6.12.y
Are you sure you want to change the base?
amdgpu fixes for rpi5 #6947
Conversation
fcca389
to
72af394
Compare
The alignment trap isn't needed if all userspace programs respect the alignment requirements. I guess llama.cpp might do that, so it works without it. Xorg I found did need it, even the arm64 build (or a userspace workaround like the memcpy library). The Ampere version should work as well, although I haven't tried it. The Ampere version also covers kernelspace, while mine only covers userspace, so more cards might work with it without extra changes, but at the cost of some performance (whether that would be noticeable or not, I don't know). |
These would be best submitted upstream where the devs who actually understand this driver can comment if the patches are correct (or could be achieved in better ways). See submitting patches. No objection to leaving this PR here for information for other interested users, but we are unlikely to merge it as a downstream only patch. If any patches are accepted upstream we're generally happy to cherry-pick them to get them into trees sooner. |
The impression I got from the @6by9 comment linked above is that you could maybe guide us on what might be needed to upstream these changes.
I'd be |
Yeah, @6by9 is probably a better guide - he's succeeded in upstreaming a number of patches recently. |
This cleans up the commit history of the amazing work by @Coreforge to make AMD GPUs work with the Raspberry Pi 5, following instructions by @6by9: geerlingguy/raspberry-pi-pcie-devices#222 (comment) and an explanation of the different parts of the patch: geerlingguy/raspberry-pi-pcie-devices#222 (comment)
So I've made
What is not included at the moment is the whole alignment machinery which to my understanding is more hacky and could be harder to get merged or might require significant changes. I'm not sure how essential that change is, but if desired I could include it as a separate commit as well. Or maybe the Ampere version of that trap could be used. fwiw, it seems llama.cpp works equally well without that patch applied from limited testing.
Just to be clear, I don't claim any authorship or even understanding of these changes, and am just trying to grease the wheels of getting these changes upstreamed as far as they will go, making it easier to use GPUs on Raspberry Pi, which I have a big interest in: https://sanctuary-systems.com/sentinel-core/