diff --git a/docs/type_inference.md b/docs/type_inference.md index 5bf19a9ff7..0a249d573a 100644 --- a/docs/type_inference.md +++ b/docs/type_inference.md @@ -71,10 +71,11 @@ The solution is as follows: this isn't possible due to the inability to infer return types (such as with`ReshapeOp` or `BroadcastInDimOp`), create a verifier to contain the necessary verification logic. Typically inferable ops, - like `AddOp`, may still need a verifier to perform additional verifications - when quantization is involved. + like `AddOp`, may still need a verifier to perform additional verifications, + because they are verifying constraints of a provided return type, which + is not accessible in the type/shape inference methods. -2. **For ops with regions** (like `ReduceOp/IfOp`; a full list is +3. **For ops with regions** (like `ReduceOp/IfOp`; a full list is [here](https://github.com/openxla/stablehlo/pull/401)): The autogenerated builders don't take regions as parameters, so if these builders involve type inference, then the shape function will be called with empty regions (see