Uh oh!
There was an error while loading. Please reload this page.
[Relay][CanonicalizeOps] Make Bias_add shape same as the other operand - #4050
[Relay][CanonicalizeOps] Make Bias_add shape same as the other operand#4050anijain2305 wants to merge 1 commit into
Conversation
tqchen
commented
Oct 3, 2019
This is something that I am not sure about. I do think a better way would be to support general broadcast semantics, because users could reply on it instead of bias add |
anijain2305
commented
Oct 3, 2019
Yes, I agree. I don't like this either. This is restrictive only to bias_add. More concerning is that this is sort of leaky, creating dependency between two passes that are far apart. I will close this one. The alternate one is more generic - #4040 and improves AlterOpLayout braodcast support. |
yzhliu
commented
Oct 3, 2019
I also prefer the one in #4040 and with that it seems we can directly remove this CanonicalizeOps pass. |
anijain2305
commented
Oct 3, 2019
Closing this. #4040 covers this. |
Currently, the bias_add expansion is minimal, i.e., it expands the bias to the minimum number of dimensions and then rely on broadcast mechanism. This PR explicitly matches the dimension of bias_add to be exactly same as the other operand. This helps with the later stage in AlterOpLayout.
@icemelon9 @yzhliu@ZihengJiang
Alternative impl - Make AlterOpLayout flexible - #4040