[vulkan] Do not use memcmp to compare structs (#60199)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60199
It isn't safe to use `memcmp` to determine the equality of structs due to potential random padding between fields of the struct. This can cause overloaded equality operators to return false when comparing structs with equivalent fields.
This bug appears to be responsible for the Vulkan backend crashing on WorkVC release builds.
Test Plan:
Run Vulkan unit tests:
```
cd ~/fbsource
buck build -c ndk.custom_libcxx=false -c pt.enable_qpl=0 //xplat/caffe2:pt_vulkan_api_test_binAndroid\#android-arm64 --show-output
adb push buck-out/gen/xplat/caffe2/pt_vulkan_api_test_binAndroid\#android-arm64 /data/local/tmp/vulkan_api_test
adb shell "/data/local/tmp/vulkan_api_test"
cd -
```
Test on workvc rdk build, first ensure you are receiving the Vulkan models.
```
buck install fbsource//fbandroid/mode/opt fbsource//fbandroid/mode/aloha_build_rdk fbsource//fbandroid/mode/no_obfuscation fbandroid/buck-configs/buckconfig.caffe2_pkg_snpe_libs_android aloha_workvc_rdk --deep --show-full-output
```
Reviewed By: IvanKobzarev
Differential Revision: D29203177
fbshipit-source-id: e0ee79d4e635174e165b250f2cee842a09092df9