[vulkan] Disable shader optimization to avoid Validation Errors (#69331)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69331
---
## Context
When the optimization flag is turned on, some SPIR-V modules produced from the Vulkan compute shaders were invalid. The Vulkan Validation layer raises the following error for these modules:
```
[ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object: VK_NULL_HANDLE (Type = 0) | SPIR-V module not valid: Header block 52[%52] is contained in the loop construct headed by 44[%44], but it's merge block 47[%47] is not
%52 = OpLabel
```
Turning off the optimization flag, the SPIR-V modules produced no longer reports these errors in the Validation layer.
## Changes
Turns off optimization when generating SPIR-V modules to ensure correctness of the modules.
**Note that disabling SPIR-V optimization did not regress inference latency for the several models I tested**.
Test Plan: Imported from OSS
Reviewed By: beback4u
Differential Revision: D32840910
Pulled By: SS-JIA
fbshipit-source-id: 7ccb5691fd0e2d11b9c8c28ad7b83906e8163699