xuhuisheng / rocm-gfx803

196 stars 9 forks source link

unhandled SGPR spill to memory - Blender(HIP) #32

Closed H3rcu1es closed 10 months ago

H3rcu1es commented 1 year ago

Is this fatbin file version sensitive? I mean will one fatbin work on other blender versions ? like Blender 3.6 , 4.0 ? I compiled blender 4.0 and used 3.4.1's fatbin that you provided . But doesn't working

xuhuisheng commented 1 year ago

I am afraid of blender main part didn't support gfx803 by default. If you want to support gfx803, you need change codebase to support gfx803 and re-compile it.

H3rcu1es commented 1 year ago

I did change the codebase like you said in your repo and recompiled Blender 3.6.1. Then I took the kernel_gfx803.fatbin from your modified blender3.4.1 to see if it works , but i didn't . Looks like the fatbin file won't work with one version of Blender with another .
Whatever, since it didn't work I wanted to compile the Hip kernel. Now to test if my system is all ok to compile it I tested it on your Blender3.4.1 . I just moved the fatbin file to another place like there is no kernel and launched blender . Selected gpu compute and went to render view . It's "loading render kernel..... " and it failed . Terminal saying " : unhandled SGPR spill to memory ". Ya it's your blender3.4.1 I just tested on ,just removed the kernel file to test my system . looks like my system isn't fully setup correctly to compile it . My question is how did you install Rocm(I did install rocm from the amd link you provided),which components ? How did you get / compiled the hip kernel (that fatbin ) . Can you give me a instruction?
my system is ubuntu 20.04 . tested using both Rocm5.4.1 & 5.3.0 thank you .

xuhuisheng commented 1 year ago

@H3rcu1es I am afraid this is no gurantee to compile blender hip kernel successful all the time. As I said in the documents, I just met SGPR spill error on ROCm-5.1, then there is no error on ROCm-5.3. So all we can do is wishing it can success on some new version ROCm.

My patch is very simple, I just change all of noinline to inline, then on some version of ROCm, it just success.

https://github.com/xuhuisheng/rocm-gfx803/blob/master/blender.md

H3rcu1es commented 1 year ago

1) I am still getting "error: unhandled SGPR spill to memory" . I am on rocm 5.3,Ubuntu20.04(kernel 5.15) . Can you give me some command so I can give you any log or output so you can check if all the necessary files I have , For example : ROCMs,HIPs?

2) I used - "sudo amdgpu-install --usecase=rocm,graphics,hip,rocmdevtools --no-dkms" to install rocm . Is this ok ? 3) You said you followed blenders script to compile hip kernel .Which script ?