Commit af92b60
committed
[ExecuTorch][WebGPU] Graph-owned scratch buffers for fused-op intermediates
Pull Request resolved: pytorch#20073
Add `WebGPUGraph::create_scratch_buffer` for fused-op intermediates (SDPA's `attn_weights`/`attn_weights_softmax`) that are not model tensors and live only between dispatches. Graph-owned, released in the destructor. Vulkan models these as graph tensors; we use raw buffers (buffer-only backend). Consumed by the fused SDPA op above.
ghstack-source-id: 391378805
@exported-using-ghexport
Differential Revision: [D107543259](https://our.internmc.facebook.com/intern/diff/D107543259/)1 parent 6fa26d4 commit af92b60
2 files changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
| |||
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
63 | 79 | | |
64 | 80 | | |
65 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
0 commit comments