[vulkan] Improve target environment support (#3211)

This commit improves Vukan target environment support by refining
the #vk.target_env specification regarding the GPU device. Now we
can attach a `<vendor>:<device-type>[:<device-id>]` inside to
describe the target GPU and the information will be plumbed all
the way to SPIR-V side to influence CodeGen in the future.

Also, this commit introduces a `iree-vulkan-target-triple` option
to allow specifying common target GPUs. Along the way, a few
extensions and features are pulled in.
diff --git a/docs/design_docs/hal_driver_features.md b/docs/design_docs/hal_driver_features.md
index 7edaad2..2bc59fc 100644
--- a/docs/design_docs/hal_driver_features.md
+++ b/docs/design_docs/hal_driver_features.md
@@ -31,8 +31,8 @@
 exactly the same. We need to bridge these two worlds inside IREE.
 
 IREE has its own [Vulkan dialect][iree-vulkan-dialect], which defines the Vulkan
-target environment, including [versions][iree-vulkan-base],
-[extensions][iree-vulkan-base], [features][iree-vulkan-cap-td]. These
+target environment, including [versions][iree-vulkan-base-td],
+[extensions][iree-vulkan-base-td], [features][iree-vulkan-cap-td]. These
 definitions leverage MLIR attribute for storage, parsing/printing, and
 validation. For example, we can have the following Vulkan target environment:
 
@@ -41,8 +41,11 @@
   v1.1, r(120),
   [VK_KHR_spirv_1_4, VK_KHR_storage_buffer_storage_class],
   {
+    maxComputeSharedMemorySize = 16384 : i32,
     maxComputeWorkGroupInvocations = 1024: i32,
-    maxComputeWorkGroupSize = dense<[128, 8, 4]>: vector<3xi32>
+    maxComputeWorkGroupSize = dense<[128, 8, 4]>: vector<3xi32>,
+    subgroupFeatures = 7: i32,
+    subgroupSize = 64 : i32
   }
 >
 ```
@@ -62,11 +65,14 @@
 
 When compiling ML models towards Vulkan, one specifies the target environment as
 a `#vk.target_env` attribute assembly via the
-[`iree-vulkan-target-env`][iree-vulkan-target-cl] command line option. At the
+[`iree-vulkan-target-env`][iree-vulkan-target-env] command-line option. At the
 moment only one target environment is supported; in the future this is expected
 to support multiple ones so that one can compile towards different Vulkan
 implementations at once and embed all of them in the final FlatBuffer and select
-at runtime.
+at runtime. Another command-line option, `iree-vulkan-target-triple` is also
+available to allow specifying common triples and avoiding the lengthy target
+environment assembly string. `iree-vulkan-target-triple` will be overridden by
+`iree-vulkan-target-env` if both are given.
 
 Under the hood, this Vulkan target environment is then converted to the SPIR-V
 target environment counterpart to drive code generation. The conversion happens
@@ -86,7 +92,8 @@
 [iree-vulkan-dialect]: https://github.com/google/iree/tree/main/iree/compiler/Dialect/Vulkan
 [iree-vulkan-base-td]: https://github.com/google/iree/blob/main/iree/compiler/Dialect/Vulkan/IR/VulkanBase.td
 [iree-vulkan-cap-td]: https://github.com/google/iree/blob/main/iree/compiler/Dialect/Vulkan/IR/VulkanAttributes.td
-[iree-vulkan-target-cl]: https://github.com/google/iree/blob/b4739d704de15029cd671e53e7d7e743f4ca2e35/iree/compiler/Dialect/HAL/Target/VulkanSPIRV/VulkanSPIRVTarget.cpp#L66-L70
+[iree-vulkan-target-env]: https://github.com/google/iree/blob/b4739d704de15029cd671e53e7d7e743f4ca2e35/iree/compiler/Dialect/HAL/Target/VulkanSPIRV/VulkanSPIRVTarget.cpp#L66-L70
+[iree-vulkan-target-triple]: https://github.com/google/iree/blob/main/iree/compiler/Dialect/Vulkan/Utils/TargetEnvUtils.cpp
 [iree-vulkan-target-conv]: https://github.com/google/iree/blob/b4739d704de15029cd671e53e7d7e743f4ca2e35/iree/compiler/Dialect/Vulkan/Utils/TargetEnvUtils.h#L29-L42
 [iree-spirv-target-attach]: https://github.com/google/iree/blob/b4739d704de15029cd671e53e7d7e743f4ca2e35/iree/compiler/Dialect/HAL/Target/VulkanSPIRV/VulkanSPIRVTarget.cpp#L228-L240
 [mlir-spirv-target]: https://mlir.llvm.org/docs/Dialects/SPIR-V/#target-environment