Open
Description
The amdgpu dialect docs contain op description and auto-generated syntax but not actual examples. We should improve dialect documentation by adding an example(s) for each op.
Other dialects like arith or SPIR-V can be referenced for inspiration on how to provide examples, e.g.:
Example:
// Scalar addition. %a = arith.addi %b, %c : i64 // Scalar addition with overflow flags. %a = arith.addi %b, %c overflow<nsw, nuw> : i64 // SIMD vector element-wise addition. %f = arith.addi %g, %h : vector<4xi32> // Tensor element-wise addition. %x = arith.addi %y, %z : tensor<4x?xi8>
We should be able to extract examples by looking at op tests in https://github.com/llvm/llvm-project/blob/main/mlir/test/Dialect/AMDGPU/ops.mlir