ggml-wegpu: handle the buffer aliasing for rms fuse#22266
ggml-wegpu: handle the buffer aliasing for rms fuse#22266reeselevine merged 3 commits intoggml-org:masterfrom
Conversation
|
Thanks for the fix. I tested it out and it looks like even with @yomaytk fyi, if you're working on other fusion chains it might be good to check to see what other kind of buffer aliasing can occur and add a test for it in test-backend-ops if possible. |
|
Thanks for the fix, this looks good to me. How about adding a test case in test-backend-ops and confirming that it passes without
Got it, thanks. |
Overview
This PR addressed an edge case of #21983. I load and run a model in the browser, and I met this error:
As the error showed, it was associated with the buffer overlapping. I used a coding agent to analyze the logs:
inplaceflag was only checking ifmul_srcanddstoverlappedrn_srcoverlapped withdst, i.e. (rn_src==dst), leading to thistensor_buf3issue.I reused the convention from the 'binary' shader:
Additional information
I didn't run any benchmark tests and only tested the model behaviour in the browser.
Requirements