Commit a76a9d0
authored
fix(cuda): sync memory subtree streams before drop (#2175)
In some edge case where right after we start `build_async` on the memory
merkle subtrees, if the program panics, then the order of drop could be
that we drop the `initial_memory` buffers on the default stream first,
while the `build_async` kernels are still running and using those
buffers. This leads to a deadloop. I fixed it by just forcing the drop
to drop subtrees first (which should sync their special streams) before
dropping `initial_memory`.
compare:
https://github.com/axiom-crypto/openvm-reth-benchmark/actions/runs/187331111531 parent 2a63e2a commit a76a9d0
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
0 commit comments