pytorch
7bcc446e - [Vulkan][Optimize for Mobile] Avoid dereferencing element [0] if the vector is empty (#92918)

Commit
1 year ago
[Vulkan][Optimize for Mobile] Avoid dereferencing element [0] if the vector is empty (#92918) Summary: Avoid dereferencing element [0] if the vector is empty. ___ In ```transferInputOutputBackends```, one of the rewrite passes for Vulkan ```optimize_for_mobile```, an out of bounds access happens when trying to insert a backend transfer for an input if that input's ```uses()``` is empty. This diff corrects that issue. Test Plan: Run tests ___ Phabricator + CI Tests Reviewed By: SS-JIA Differential Revision: D41296037 Pull Request resolved: https://github.com/pytorch/pytorch/pull/92918 Approved by: https://github.com/SS-JIA, https://github.com/kirklandsign
Author
Committer
Parents
Loading