Yeah, it all wants to be static static to operate on.
But so what I'm after is the next step, eliminate all ops not needed in a
static setting.
This seems important for anything where the graph is created automatic - with
the frontend converters as well as differentiation.
Best regards
Thomas
@t-vi Sorry for my delay, I had a lot of meetings today. I've finally read
through this enough to grok the problem. I'm not sure the Pattern Language is
the right tool for this pass.
As you said here:
[quote="t-vi, post:3, topic:7012"]
I’m always wondering whether I’m missing ready-made pass
[quote="mbrookhart, post:13, topic:7012"]
I don’t particular want to force users to type their problems before using the
pattern language in all cases.
[/quote]
I can see why. But so it seems that the shape processing gets really tedious
here - with the inability to pass .shape back to relay b
Ah, yeah, this makes sense now.
The first LikeZapp pass will return this in certain cases:
```
tvm.relay.broadcast_to(data, list(res._checked_type_.shape))
```
Which doesn't have a type when it is constructed, but ZeroZapp later can find
that node and assume it does have a type. Thus, the prob
I agree with @matt-arm. The `checked_type_` would be empty when a node is
created until `InterType` is run or a new function is added to the module. It
means the later processing node may not get the type of its parents if the
parents were replaced with new nodes without properly propogating
The sort of case I'm thinking of is when a mutation takes place, the mutated
part of the graph won't have types associated with it (at least, not until
type_infer is called on the expression again). It's not immediately obvious to
me whether that's happening in this example. But now I've thoug
The above ZeroZapper code snippet also has the problem.
---
[Visit Topic](https://discuss.tvm.ai/t/same-shape-pattern/7012/10) 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/
@matt-arm Can you give me an example? Is this just the partition issue we
talked about before, or something else?
---
[Visit Topic](https://discuss.tvm.ai/t/same-shape-pattern/7012/9) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these email
Oh, that is very likely the case for me here.
---
[Visit Topic](https://discuss.tvm.ai/t/same-shape-pattern/7012/8) 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/3e50fe8fbc5
There is another way types can go awry in the dataflow matcher. When things get
mutated they lose their type info until the rewrite is completed. We might want
to start treating that behaviour as a bug because it's caught me out before.
Maybe @mbrookhart can comment?
---
[Visit Topic](htt
Thank you Matt!
Oh no. :man_facepalming: (But `checked_type` isn't the solution,
unfortunately.)
I must admit the ffi is too clever for me. Without the tab completion I'm lost.
I even have a 2-line patch to fix that for classes, but I don't know where to
put the unittest...
---
[Visit
Have you tried using checked_type rather than _checked_type_?
---
[Visit Topic](https://discuss.tvm.ai/t/same-shape-pattern/7012/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/unsubsc
So with the following rewrites and passes
```python
class ZeroZapp(tvm.relay.dataflow_pattern.DFPatternCallback):
def __init__(self):
self.zeros =
tvm.relay.dataflow_pattern.is_op("zeros")(tvm.relay.dataflow_pattern.wildcard())
self.other_tensor = tvm.relay.dataflow_pattern.
Thank you, yes.
So I have this graph produced by gradient (and graph normal form and removing
the forward outputs) of a dense + bias_add. Obviously, the gradients would be
`ones_like(output).collapse_like(bias)` and a couple of `dense( )` with
`grad_out` or its transpose replacing weight and i
Could you provide example graphs before and after the pattern matching and
rewriting to better illustrate your requirements?
---
[Visit Topic](https://discuss.tvm.ai/t/same-shape-pattern/7012/2) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from
Now I'm trying to produce a pattern that matches nodes if they have the same
shape.
Is such a pattern available? I only saw has_shape which seems to compare to a
fixed shape (which I don't know).
I'm trying to use rewrite and so it seems checking after the matching (an
returning an unchanged e
16 matches
Mail list logo