[doc] Update Vulkan docs w.r.t. target support (#7208)
Co-authored-by: Scott Todd <scotttodd@google.com>
diff --git a/docs/website/docs/deployment-configurations/gpu-vulkan.md b/docs/website/docs/deployment-configurations/gpu-vulkan.md
index a973bc3..3523fb9 100644
--- a/docs/website/docs/deployment-configurations/gpu-vulkan.md
+++ b/docs/website/docs/deployment-configurations/gpu-vulkan.md
@@ -6,13 +6,22 @@
cross-vendor: it is supported by most GPU vendors, including AMD, ARM, Intel,
NVIDIA, and Qualcomm.
-!!! todo
-
- Add IREE's GPU support matrix: what GPUs are supported; what GPUs are well
- optimized; etc.
-
<!-- TODO(??): when to use CPU vs GPU -->
+## Support matrix
+
+As IREE and the compiler ecosystem it operates within matures, more
+target specific optimizations will be implemented. At this stage, expect
+reasonable performance across all GPUs and for improvements to be
+made over time for specific vendors and architectures.
+
+GPU Vendor | Category | Performance | Focus Architecture
+:--------: | :------: | :---------: | :----------------:
+ARM Mali GPU | Mobile | Good | Valhall
+Qualcomm Adreno GPU | Mobile | Reasonable | 640+
+AMD GPU | Desktop/server | Reasonable | -
+NVIDIA GPU | Desktop/server | Reasonable | -
+
## Prerequisites
In order to use Vulkan to drive the GPU, you need to have a functional Vulkan
@@ -135,20 +144,30 @@
In the build directory, run the following command:
-``` shell hl_lines="3"
+``` shell hl_lines="3 4"
iree/tools/iree-translate \
-iree-mlir-to-vm-bytecode-module \
-iree-hal-target-backends=vulkan-spirv \
+ -iree-vulkan-target-triple=<...> \
iree_input.mlir -o mobilenet-vulkan.vmfb
```
-
-!!! todo
-
- Choose the suitable target triple for the current GPU
-
where `iree_input.mlir` is the model's initial MLIR representation generated by
IREE's TensorFlow importer.
+Note that a target triple of the form `<vendor/arch>-<product>-<os>` is needed
+to compile towards each GPU architecture. If no triple is specified then a safe but
+more limited default will be used.
+We don't support the full spectrum here[^1]; the following table summarizes the
+currently recognized ones:
+
+GPU Vendor | Target Triple
+:--------: | :-----------:
+ARM Mali GPU | `valhall-g78-android11`
+Qualcomm Adreno GPU | `adreno-unknown-android11`
+AMD GPU | e.g., `rdna1-5700xt-linux`
+NVIDIA GPU | e..g, `ampere-rtx3080-windows`
+SwiftShader CPU | `cpu-swiftshader-unknown`
+
### Run the model
#### Run using the command-line
@@ -177,6 +196,11 @@
<!-- TODO(??): troubleshooting -->
+[^1]: It's also impossible to capture all details of a Vulkan implementation
+with a target triple, given the allowed variances on extensions, properties,
+limits, etc. So the target triple is just an approximation for usage.
+
+
[android-cc]: ../building-from-source/android.md
[get-started]: ../building-from-source/getting-started.md
[iree-releases]: https://github.com/google/iree/releases/