diff --git a/backends/vulkan/runtime/VulkanBackend.cpp b/backends/vulkan/runtime/VulkanBackend.cpp index 37ca1fd6e14..c1f3f06b440 100644 --- a/backends/vulkan/runtime/VulkanBackend.cpp +++ b/backends/vulkan/runtime/VulkanBackend.cpp @@ -449,6 +449,9 @@ class VulkanBackend final : public PyTorchBackendInterface { Error err = compileModel(processed->data(), compute_graph); + // This backend does not need its processed data after compiling the model. + processed->Free(); + if (err != Error::Ok) { return err; }