[vulkan] Re-route arithmetic ops to scalar versions when second arg is zero-dim (#73108)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73108
When arithmetic ops are invoked from torchscript the scalar argument will sometimes be wrapped in a zero-dimensional tensor, which will cause the Vulkan implementation to complain as all input tensors are expected to have the same number of channels. The solution is to have the Tensor implementations of the op check if the second argument is zero-dimensional and re-route it to the Scalar implementation if that's the case.
Test Plan: Imported from OSS
Reviewed By: mikaylagawarecki
Differential Revision: D34354840
Pulled By: SS-JIA
fbshipit-source-id: b24799bb3dd4336791a39bea9382c14243ad58e4
(cherry picked from commit c6dd8eb13b9be3800405c64a3a81e5c68da64355)