SIGN IN SIGN UP

remove unused tensors from VK model's graph (#4427)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/4427

We implemented [operators fusion](https://github.com/pytorch/executorch/pull/3769?fbclid=IwZXh0bgNhZW0CMTEAAR3kYya0wRrkupmV86OpPZZ9_QhqLYEmNrKcJk5Jj_4VSO_WqvFsbWNigTs_aem_gQeSu2zvazf_hpy3RsIXhg) (`conv+bn`) which fused `conv` and `bn`'s weights and biases, but the old parameters are not deleted. Hence we saw that VK model's size is nearly twice large as CPU's.

As regards mobilenet_v2, before this diff CPU vs VK: 14M vs 22M. After this diff, both of them have 14M.

Reviewed By: SS-JIA

Differential Revision: D60257047

fbshipit-source-id: ca9e0f38d53187edff9dba45fdeffa619fde51a7
W
Wei Lu committed
faeeca8ec9040ae2db23973139c1b5f71ea51d4c
Parent: 889e5cb
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 7/26/2024, 4:23:45 AM