I'm afraid I haven't made my point clear.  By using has_type, we can match to a 
specific dtype, but the shape of tensor is also fixed. By using wildcard(), we 
can match to (**AnyShape**, **AnyType**).  How to achieve something like 
has_type((**AnyShape**, 'float32'))?
```
in1 = wildcard()
in2 = wildcard()
pat = is_op('add')(in1, in2).has_type(relay.TensorType((10, 10), 'float32'))

x = relay.var('x', shape=(10, 10), dtype='float32')
pat.match(relay.add(x, x))
```
Thanks





---
[Visit 
Topic](https://discuss.tvm.ai/t/pattenlang-how-to-match-op-according-to-element-type-of-input-and-output/6846/5)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/b9345d84e5dd4935dc572de4ade3aa61db9de9184ec637b34bc5df8962da94df).

Reply via email to