Fix zero size tensors (#3702)
Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/3702
## Context
Dispatching a command buffer with a work group size that contains 0 is undefined behaviour. On some devices, this can cause the device to be lost. Fix this by setting the work group size to `{1, 1, 1}` right before dispatching a command buffer if the work group size contains a 0.
Reviewed By: yipjustin
Differential Revision: D57655257
fbshipit-source-id: 6209668c960f0e0afb0de0ab8b09c285e2de56b9 S
Stephen Jia committed
ab1c8aafc7d56b45945e5ec7dc8803a3aa96cceb
Parent: 705ac96
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 5/22/2024, 1:41:39 PM