Skip to content

Commit 7f75fb6

Browse files
jorgep31415facebook-github-bot
authored andcommitted
Free Vulkan delegate segments after loading
Summary: It's been a while since I had an impactful one-liner. :) Nothing innovative here, just reusing the same solution as [other backends](https://github.com/pytorch/executorch/blob/b19d5860568187f2567d93dd5e7cd5af32378d9f/backends/xnnpack/runtime/XNNPACKBackend.cpp#L47-L48). Differential Revision: D56281665
1 parent b19d586 commit 7f75fb6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backends/vulkan/runtime/VulkanBackend.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ class VulkanBackend final : public PyTorchBackendInterface {
449449

450450
Error err = compileModel(processed->data(), compute_graph);
451451

452+
processed->Free();
453+
452454
if (err != Error::Ok) {
453455
return err;
454456
}

0 commit comments

Comments
 (0)