masahi commented on pull request #9069:
URL: https://github.com/apache/tvm/pull/9069#issuecomment-924802689
Something is off in task weights extracted by VM compiler. In the following
network (MLP), there is two `dense` ops with identical workload. So there is
one task with weight 2. The graph compiler returns the correct weight, but the
VM compiler returns 1. Weights returned by the VM compiler are always smaller
than the graph compiler.
```
def @main(%data: Tensor[(1, 32), float32], %fc1_weight: Tensor[(32, 32),
float32], %fc1_bias: Tensor[(32), float32], %fc2_weight: Tensor[(32, 32),
float32], %fc2_bias: Tensor[(32), float32]) -> Tensor[(1, 32), float32] {
%0 = nn.dense(%data, %fc1_weight, units=32) /* ty=Tensor[(1, 32), float32]
*/;
%1 = nn.bias_add(%0, %fc1_bias, axis=-1) /* ty=Tensor[(1, 32), float32] */;
%2 = nn.relu(%1) /* ty=Tensor[(1, 32), float32] */;
%3 = nn.dense(%2, %fc2_weight, units=32) /* ty=Tensor[(1, 32), float32] */;
%4 = nn.bias_add(%3, %fc2_bias, axis=-1) /* ty=Tensor[(1, 32), float32] */;
nn.relu(%4) /* ty=Tensor[(1, 32), float32] */
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]