In a context in which shape.broadcast is known not to produce an error value,
we want it to operate solely on extent tensors. The operation's behavior is
then undefined in the error case as the result type cannot hold this value.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/Dialect/Shape/canonicalize.mlir | ||
---|---|---|
69 | I would disallow this case. You can only have a tensor result of both inputs are tensors. Otherwise, there is no guarantee that the inputs will not be an error. |
mlir/test/Dialect/Shape/canonicalize.mlir | ||
---|---|---|
69 | If I understand the semantics correctly, even if both inputs are of type tensor<?xindex> the result can be an error: [1,2], [3,4] -> error |
mlir/test/Dialect/Shape/canonicalize.mlir | ||
---|---|---|
69 | Yes, you can only have a tensor result if both inputs are tensors but having tensor inputs is not sufficient to mandate a tensor output. Still, we should disallow cases that are statically wrong. |
Thanks. With one more test this is good to land!
mlir/test/Dialect/Shape/canonicalize.mlir | ||
---|---|---|
65 | Could you add the tensor, tensor -> shape case as well? Just to make sure it stays supported. |
Could you add the tensor, tensor -> shape case as well? Just to make sure it stays supported.