From 1806f1d018d2245cfeaacb43b2aca82e9e71e094 Mon Sep 17 00:00:00 2001 From: Abhinav Gunjal Date: Mon, 22 Apr 2024 17:34:18 -0700 Subject: [PATCH] Update type_inference.md --- docs/type_inference.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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